Closed Bug 790601 Opened 12 years ago Closed 11 years ago

Javascript element should not exist with old id

Categories

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

15 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla26

People

(Reporter: satyacbit, Assigned: peterv)

References

Details

(Keywords: dev-doc-complete, site-compat)

Attachments

(1 file)

Attached file idTest.htm
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.52 Safari/537.4

Steps to reproduce:

Accessed the HTMLElement with its id in javascript (say "ip1").
Changed the id (say "ip2").



Actual results:

It has two javascript objects with new id and old id
i.e both ip1 and ip2 objects are available.


Expected results:

It should have only the javascript object with new id.
i.e Only ip2 should exist. ip1 must not exist
Severity: normal → blocker
Priority: -- → P1
Attachment #660405 - Attachment mime type: text/plain → text/html
I get the same result in IE9
Severity: blocker → normal
Component: Untriaged → DOM
Priority: P1 → --
Product: Firefox → Core
I suspect this is the same sort of problem as bug 718420 and will be solved with the new DOM bindings.
Yeah, this is basically the same thing as bug 170799.
Depends on: 170799
Summary: Javascript element should exist with old id → Javascript element should not exist with old id
tried delete <<old_id>>. But no luck.
Delete only deletes own properties.  This property is on the global scope polluter, not on the window.  "delete Object.getPrototypeOf(Object.getPrototypeOf(window)).ip1" should work.
I cannot reproduce the problem in Nightly26.0a1.

Fixed window(m-i)
Bad:
http://hg.mozilla.org/integration/mozilla-inbound/rev/6a5a7b55c22a
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0 ID:20130809175542
Fixed:
http://hg.mozilla.org/integration/mozilla-inbound/rev/29c341748a6b
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0 ID:20130809193241
Pushlog:
http://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=6a5a7b55c22a&tochange=29c341748a6b

I guess this is fixed by Bug 895758
Yup.
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Depends on: 895758
Flags: in-testsuite?
Resolution: --- → FIXED
Assignee: nobody → peterv
Target Milestone: --- → mozilla26
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: