New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 684843 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Feb 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

Calling initCustomEvent() while dispatching an event should not set that event's CustomEvent.detail property

Project Member Reported by cvrebert@google.com, Jan 24 2017

Issue description

Chrome Version: 58.0.2991.0
OS: macOS 10.12.2

What steps will reproduce the problem?
(1) Open http://jsbin.com/vekiji/edit?html,js,console,output in Chrome
(2) Observe the console output

What is the expected result?
"AFTER: type=foo"
"AFTER: bubbles=false"
"AFTER: cancelable=false"
"AFTER: detail=origDetail"

What happens instead?
"AFTER: type=foo"
"AFTER: bubbles=false"
"AFTER: cancelable=false"
"AFTER: detail=newDetail"

In other words, the last line should instead be "AFTER: detail=origDetail".

Further details:
This is a simplified version of the test in
http://w3c-test.org/dom/events/Event-init-while-dispatching.html
that fails with:
Fail	Calling initCustomEvent while dispatching.
	assert_equals: initCustomEvent detail setter should short-circuit expected (object) null but got (number) 1

Both tests call initCustomEvent() on an already-initialized CustomEvent while it's being dispatched.
Per step 1 of https://dom.spec.whatwg.org/#dom-customevent-initcustomevent ,
calling .initCustomEvent() on an event while that event is being dispatched should have no effect.
(See also step 1 of https://dom.spec.whatwg.org/#dispatching-events .)
Instead, Chrome is setting the CustomEvent.detail property to the value given in the initCustomEvent() call.
 

Comment 1 by tkent@chromium.org, Jan 26 2017

Labels: Hotlist-Interop Hotlist-GoodFirstBug
Status: Available (was: Untriaged)

Comment 2 by l...@chromium.org, Feb 7 2017

Owner: l...@chromium.org
Status: Started (was: Available)

Comment 4 by l...@chromium.org, Feb 9 2017

Status: Fixed (was: Started)

Comment 5 by tkent@chromium.org, Mar 15 2017

Components: -Blink>DOM>Events Blink>DOM
Remove Blink>DOM>Events

Sign in to add a comment