Closed
Bug 248966
Opened 21 years ago
Closed 21 years ago
In <EdAECSSAttributes.js>, 2 "Warning: assignment to undeclared variable" (i & value)
Categories
(SeaMonkey :: Composer, defect)
SeaMonkey
Composer
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla1.8alpha2
People
(Reporter: sgautherie, Assigned: sgautherie)
References
()
Details
Attachments
(1 obsolete file)
[Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7) Gecko/20040616] (release) (W98SE)
and
[Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8a1) Gecko/20040520] (release) (W98SE)
{{
Warning: assignment to undeclared variable i
Source File: chrome://editor/content/EdAECSSAttributes.js
Line: 66
Warning: assignment to undeclared variable value
Source File: chrome://editor/content/EdAECSSAttributes.js
Line: 69
}}
My case is when opening 'Advaned Properties' for a |<DIV>|...
Assignee | ||
Comment 1•21 years ago
|
||
Fixes the 2 reported warnings,
plus another one that should be (!),
plus removes an unused var.
Assignee: composer → gautheri
Status: NEW → ASSIGNED
Assignee | ||
Updated•21 years ago
|
Attachment #151908 -
Flags: superreview?(sfraser)
Attachment #151908 -
Flags: review?(daniel)
Assignee | ||
Comment 2•21 years ago
|
||
Brendan:
Shouldn't we get another warning for |name| at line 68 too ??
![]() |
||
Comment 3•21 years ago
|
||
Note that window.name is a DOM level 0 property, and var does not override a
pre-existing property of the same name, so lack of var leaves name in a document
script referring to window.name.
/be
Updated•21 years ago
|
Attachment #151908 -
Flags: superreview?(sfraser) → superreview+
Assignee | ||
Comment 4•21 years ago
|
||
(In reply to comment #3)
> Note that window.name is a DOM level 0 property, and var does not override a
> pre-existing property of the same name, so lack of var leaves name in a document
> script referring to window.name.
Ah ! Then, it's correct not to get the warning on |name| :-)
Yet, adding |var| on it is what we want here, isn't it !?
![]() |
||
Comment 5•21 years ago
|
||
Adding var won't override the window property. If you don't want to change the
name of the window (used by target= and window.open's second argument to find
the named window), then it would be better to use a different variable name --
and of course to declare it with var.
/be
Comment on attachment 151908 [details] [diff] [review]
(Av1) <EdAECSSAttributes.js>
[Checked in: Comment 7]
r=daniel@glazman.org
Serge, add yourself on a new contributor line :-)
Attachment #151908 -
Flags: review?(daniel) → review+
Checked in, on Serge's request.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•21 years ago
|
Attachment #151908 -
Attachment description: (Av1) <EdAECSSAttributes.js> → (Av1) <EdAECSSAttributes.js>
[Checked in: Comment 7]
Attachment #151908 -
Attachment is obsolete: true
Assignee | ||
Updated•21 years ago
|
Target Milestone: --- → mozilla1.8alpha2
Updated•21 years ago
|
Product: Browser → Seamonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•