Closed
Bug 329360
Opened 18 years ago
Closed 18 years ago
strict javascript warning: "variable event hides argument" in calendar-alarm-dialog
Categories
(Calendar :: Internal Components, defect)
Calendar
Internal Components
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: gekacheka, Unassigned)
Details
Attachments
(1 file)
1.39 KB,
patch
|
jminta
:
first-review+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1 Build Identifier: 20060303 calendar-alarm-dialog produces a strict javascript warning. Reproducible: Always Steps to Reproduce: 1. Enable strict javascript warnings Thunderbird: tools > options > advanced > config editor set "javascript.options.strict" to "true" 2. Set alarm and let alarm go off. Actual Results: Alarm dialog appears, and the following appears in javascript console: Warning: variable event hides argument Source File: chrome://calendar/content/calendar-alarm-dialog.xul Line: 1, Column: 4 Source Code: var event = document.createEvent('Events'); event.initEvent('dismiss', false, false); this.dispatchEvent(event); Expected Results: No warnings. Code is not in the xul file shown, but in an xbl file, calendar-alarm-widget.xml, for the widget that is added for each alarm that has gone off.
(patch -l -p 2 -i file.patch) Warning appears when dismissing the alarm. Since 'event' is already bound in this context, rename the var to more descriptive event name: 'dismissEvent'. Ditto for 'snoozeEvent' (currently commented out).
Comment 2•18 years ago
|
||
Comment on attachment 214019 [details] [diff] [review] rename "var event" to "var dismissEvent" Asking review, before it falls through the cracks.
Attachment #214019 -
Flags: first-review?(jminta)
Comment 3•18 years ago
|
||
Comment on attachment 214019 [details] [diff] [review] rename "var event" to "var dismissEvent" r=jminta, although these probably want to be regular methods at some point
Attachment #214019 -
Flags: first-review?(jminta) → first-review+
Comment 4•18 years ago
|
||
Thanks for the patch. Checked in.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Comment 5•18 years ago
|
||
The bugspam monkeys have struck again. They are currently chewing on default assignees for Calendar. Be afraid for your sanity!
Assignee: base → nobody
You need to log in
before you can comment on or make changes to this bug.
Description
•