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

Issue 643511 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Last visit > 30 days ago
Closed: Oct 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 643030



Sign in to add a comment

CustomElement tests: define element callback checks

Project Member Reported by davaajav@google.com, Sep 2 2016

Issue description

https://html.spec.whatwg.org/multipage/scripting.html#element-definition

10.4.2 If callbackValue is not undefined, then set the value of the entry in lifecycleCallbacks with key callbackName to the result of converting callbackValue to the Web IDL Function callback type. Rethrow any exceptions from the conversion.

In the existing tests. we are checking whether isCallable(callback) is false or not.

define-element.html
 
Blocking: 643030
Project Member

Comment 2 by sheriffbot@chromium.org, Sep 2 2016

Labels: Hotlist-Google
Components: Blink>DOM
I *think* the implementation may be correct? Do we throw TypeError if it is not callable? I think we might:

https://cs.chromium.org/chromium/src/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinitionBuilder.cpp?q=customelementdefinitionb&sq=package:chromium&l=125

Here's the spec for converting to function:

https://heycam.github.io/webidl/#es-callback-function

Comment 5 by tkent@chromium.org, Sep 9 2016

Components: -Blink>DOM Blink>WebComponents

Comment 6 by hayato@chromium.org, Sep 12 2016

Cc: kojii@chromium.org
Owner: dominicc@chromium.org
Status: Assigned (was: Untriaged)

Comment 7 by hayato@chromium.org, Oct 12 2016

Components: -Blink>WebComponents Blink>HTML>CustomElements
Status: WontFix (was: Assigned)
I think this is working as intended, here's where we check whether the value is a function/throw TypeError:

https://cs.chromium.org/chromium/src/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinitionBuilder.cpp?q=customelementdefinitionb&sq=package:chromium&l=115

I think this is per the spec:

https://heycam.github.io/webidl/#es-callback-function

TreatNullObjectAsNull/the attribute assigning stuff does not apply in this case.

Sign in to add a comment