Calling initCustomEvent() while dispatching an event should not set that event's CustomEvent.detail property |
||||
Issue descriptionChrome 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.
,
Feb 7 2017
,
Feb 7 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/aa57f762dfa15e283219c3ff3e9c8b9d611cae7c commit aa57f762dfa15e283219c3ff3e9c8b9d611cae7c Author: lpy <lpy@chromium.org> Date: Tue Feb 07 23:43:58 2017 Avoid setting CustomEvent.detail property in initCustomEvent while dispatch an event. BUG= 684843 Review-Url: https://codereview.chromium.org/2679933003 Cr-Commit-Position: refs/heads/master@{#448794} [delete] https://crrev.com/ca1b6d7a282882decf0f66f67f6cfea677bad1ce/third_party/WebKit/LayoutTests/external/wpt/dom/events/Event-init-while-dispatching-expected.txt [modify] https://crrev.com/aa57f762dfa15e283219c3ff3e9c8b9d611cae7c/third_party/WebKit/Source/bindings/core/v8/custom/V8CustomEventCustom.cpp
,
Feb 9 2017
,
Mar 15 2017
Remove Blink>DOM>Events |
||||
►
Sign in to add a comment |
||||
Comment 1 by tkent@chromium.org
, Jan 26 2017Status: Available (was: Untriaged)