Closed Bug 1267157 Opened 5 years ago Closed 5 years ago

Thunderbird 45.0 - cannot modify DOM

Categories

(Other Applications :: DOM Inspector, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1227305

People

(Reporter: realRaven, Unassigned)

Details

In Thunderbird 45 I cannot modify content documents (such as email in composer or in the preview pane). I noticed in error console there is the following message:

Mon Apr 25 2016 10:09:51
Error: ReferenceError: can't access lexical declaration `max' before initialization
Source file: chrome://inspector/content/viewers/dom/dom.js
Line: 1589

I would highly recommend moving 
max = max.value
in a separate line before the for loop, as the interpreter may have trouble with the second part of the let statement.
let j = min.value,
    max = max.value;
[IMO the interpreter expands this to let j=..; let max=..;  I often chain let and var statements like that for efficiency]

this is ambiguous, but I read it as you creating a new scoped variable max (or are you trying to overwrite var max? that would explain the error)

Alternatively, consider creating a fresh variable name for better readability:

  for (let j = min.value, mx = max.value; j <= mx; ++j) {
    indexes.push(j);
  }
I tried building it (removed the meta-inf) but for some reason the DOM inspector is not showing up in my menu; I think the safest way to patch it would be like this:

      let mx = max.value;
      for (let j = min.value; j <= mx; ++j) {
        indexes.push(j);
      }

but for some reason I cannot build a version that stilll shows up in my tools menu :'(

so I can't test my own patch... any ideas?
It is a pity this was already fixed long ago, just nobody whipped up a release of Inspector.
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1227305
You need to log in before you can comment on or make changes to this bug.