Closed Bug 305110 Opened 21 years ago Closed 21 years ago

DOM initEvent(): final invocation should take precedence

Categories

(Core :: DOM: Events, defect)

defect
Not set
minor

Tracking

()

RESOLVED FIXED

People

(Reporter: sync2d, Unassigned)

Details

Attachments

(1 file)

According to the DOM Level 2 Events spec, the following code should alert "true/true", but I get "false/false". javascript:e=document.createEvent("Events");e.initEvent("x",false,false); e.initEvent("x",true,true);alert(e.bubbles+"/"+e.cancelable); http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-Event-initEvent > The initEvent method is used to initialize the value of an Event created > through the DocumentEvent interface. This method may only be called before > the Event has been dispatched via the dispatchEvent method, though it may be > called multiple times during that phase if necessary. If called multiple > times the final invocation takes precedence.
This is probably fall-out from our fix to prevent reinitialization of events after they've been dispatched.
Status: UNCONFIRMED → NEW
Ever confirmed: true
I thought so too, but it's not. Patch coming up...
Comment on attachment 201896 [details] [diff] [review] Make sure to set the internal flag bits correctly if an event is re-initialized. r+sr=bzbarsky
Attachment #201896 - Flags: superreview?(bzbarsky)
Attachment #201896 - Flags: superreview+
Attachment #201896 - Flags: review?(bzbarsky)
Attachment #201896 - Flags: review+
Fix checked in.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: