Closed Bug 1271135 Opened 8 years ago Closed 8 years ago

window[''] warns "Empty string passed to getElementById()."

Categories

(Core :: DOM: Core & HTML, defect)

19 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla49
Tracking Status
firefox49 --- fixed

People

(Reporter: Oriol, Assigned: Oriol)

References

()

Details

(Keywords: regression, Whiteboard: btpp-active)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:49.0) Gecko/20100101 Firefox/49.0
Build ID: 20160508030214

Steps to reproduce:

Run this code:
    window['']

Open the console.


Actual results:

The console has this warning:
    Empty string passed to getElementById().


Expected results:

The console shouldn't have this warning.
 - The warning is confusing because the user didn't call getElementById()
 - The warning exposes an internal thing: named properties on window object use GetElementById.
 - That behavior seems to be against the HTML spec, which says that named access should only happen when the name is not the empty string.
Blocks: 799875
Keywords: regression
I don't know who should review this. I choose jst because he reviewed bug 799875.
Attachment #8750099 - Flags: review?(jst)
Attachment #8750099 - Flags: review?(jst) → review+
Keywords: checkin-needed
Whiteboard: btpp-active
https://hg.mozilla.org/mozilla-central/rev/a4aa107239e4
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
Can somebody assign the bug to me? Why can't I change the assignee of a bug filed by me?
Done, and I also gave you permission to edit bugs. With great powers comes great responsibility :)
Assignee: nobody → oriol-bugzilla
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: