New issue
Advanced search Search tips

Issue 613671 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

Invalid JavaScript in event handler content attributes get the value undefined instead of null

Project Member Reported by rbyers@chromium.org, May 20 2016

Issue description

This is the first part of  issue 597900  for why this test is failing: http://w3c-test.org/html/webappapis/scripting/events/invalid-uncompiled-raw-handler-compiled-once.html

Simple test page here: http://output.jsbin.com/qigeto

Spec: https://html.spec.whatwg.org/multipage/webappapis.html#event-handler-content-attributes, https://html.spec.whatwg.org/multipage/webappapis.html#internal-raw-uncompiled-handler

In particular: "If body is not parsable as FunctionBody or if parsing detects an early error, then follow these substeps: ... Set H's value to null."

Browsers tested:
Chrome 52.0.2739.0 Linux: fail
Firefox 46.0 Linux: pass
Safari 9.1 Mac: pass
Edge 13.10586 Win10: pass
IE 11 Win10: pass

Probably minor (not aware of any affected site) but given EVERY other browser gets this right I'd call this Hotlist-Interop.  Perhaps the fix is trivial and we can just make it?

 

Comment 1 by rbyers@chromium.org, May 20 2016

Status: Untriaged (was: Available)
Cc: -phistuck@chromium.org

Comment 3 by rbyers@chromium.org, Jul 25 2016

Cc: -haraken@chromium.org
Owner: haraken@chromium.org
haraken: please triage
Cc: haraken@chromium.org
Labels: -Pri-2 Pri-3
Owner: yukishiino@chromium.org
yukishiino: Would you take a look at this? It looks like we're just returning undefined instead of null.

Project Member

Comment 5 by bugdroid1@chromium.org, Jul 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f6c6da33a4f1a2125f393a525bbecee5a096add7

commit f6c6da33a4f1a2125f393a525bbecee5a096add7
Author: yukishiino <yukishiino@chromium.org>
Date: Wed Jul 27 13:30:09 2016

binding: Returns null if there is no valid event handler.

Simply makes DOM attributes for event handlers return null if there is
no event handler.

BUG= 613671 

Review-Url: https://codereview.chromium.org/2187503002
Cr-Commit-Position: refs/heads/master@{#408109}

[modify] https://crrev.com/f6c6da33a4f1a2125f393a525bbecee5a096add7/third_party/WebKit/LayoutTests/imported/wpt/html/webappapis/scripting/events/invalid-uncompiled-raw-handler-compiled-once-expected.txt
[modify] https://crrev.com/f6c6da33a4f1a2125f393a525bbecee5a096add7/third_party/WebKit/Source/bindings/core/v8/ScriptEventListener.h
[modify] https://crrev.com/f6c6da33a4f1a2125f393a525bbecee5a096add7/third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.h
[modify] https://crrev.com/f6c6da33a4f1a2125f393a525bbecee5a096add7/third_party/WebKit/Source/bindings/scripts/v8_types.py
[modify] https://crrev.com/f6c6da33a4f1a2125f393a525bbecee5a096add7/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.cpp
[modify] https://crrev.com/f6c6da33a4f1a2125f393a525bbecee5a096add7/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNode.cpp
[modify] https://crrev.com/f6c6da33a4f1a2125f393a525bbecee5a096add7/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp

Status: Fixed (was: Untriaged)

Comment 7 by rbyers@chromium.org, Jul 29 2016

Thanks!

Sign in to add a comment