CustomElement tests: define element callback checks |
|||||||
Issue descriptionhttps://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
,
Sep 2 2016
,
Sep 2 2016
,
Sep 8 2016
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
,
Sep 9 2016
,
Sep 12 2016
,
Oct 12 2016
,
Oct 27 2016
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 |
|||||||
Comment 1 by davaajav@google.com
, Sep 2 2016