Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

custom-elements: An element created with 0-length 'is' should be 'undefined' state. #9640

Merged
merged 1 commit into from Feb 23, 2018

Conversation

Projects
None yet
4 participants
@chromium-wpt-export-bot
Copy link
Collaborator

chromium-wpt-export-bot commented Feb 23, 2018

createElement() should accept 0-length 'is' string though
window.customElements.define() doesn't accept it and web authors
can't define such custom elements.

createElement() never finds custom element definition for 0-length 'is'.
So the state of the created elements should be 'undefined'.

https://dom.spec.whatwg.org/#dom-document-createelement

  1. Let is be the value of the is member of options, or null if no such
    member exists.

https://dom.spec.whatwg.org/#concept-create-element

7.3. If namespace is the HTML namespace, and either localName is a
valid custom element name or is is non-null, then set result’s custom
element state to "undefined".

The code before this CL incorrectly rejected 0-length 'is' value, and
made the element state 'uncustomized'.
IsEmpty() checks for "is" values should be IsNull().

Bug: 814644
Change-Id: I273f4aa07dd029e483365a9b31586297862a7140
Reviewed-on: https://chromium-review.googlesource.com/930941
Commit-Queue: Kent Tamura tkent@chromium.org
Reviewed-by: Yoshifumi Inoue yosin@chromium.org
Cr-Commit-Position: refs/heads/master@{#538692}

@wpt-pr-bot
Copy link
Collaborator

wpt-pr-bot left a comment

Already reviewed downstream.

@w3c-bots

This comment has been minimized.

Copy link

w3c-bots commented Feb 23, 2018

Build PASSED

Started: 2018-02-23 04:10:55
Finished: 2018-02-23 04:15:57

View more information about this build on:

@chromium-wpt-export-bot chromium-wpt-export-bot changed the title custom-elements: An element created with 0-length 'is' should not match to ':defined' custom-elements: An element created with 0-length 'is' should be 'undefined' state. Feb 23, 2018

@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-930941 branch from 797967e to 91c4030 Feb 23, 2018

custom-elements: An element created with 0-length 'is' should be 'und…
…efined' state.

createElement() should accept 0-length 'is' string though
window.customElements.define() doesn't accept it and web authors
can't define such custom elements.

createElement() never finds custom element definition for 0-length 'is'.
So the state of the created elements should be 'undefined'.

https://dom.spec.whatwg.org/#dom-document-createelement
> 3. Let is be the value of the is member of options, or null if no such
> member exists.

https://dom.spec.whatwg.org/#concept-create-element
> 7.3. If namespace is the HTML namespace, and either localName is a
> valid custom element name or is is non-null, then set result’s custom
> element state to "undefined".

The code before this CL incorrectly rejected 0-length 'is' value, and
made the element state 'uncustomized'.
IsEmpty() checks for "is" values should be IsNull().

Bug: 814644
Change-Id: I273f4aa07dd029e483365a9b31586297862a7140
Reviewed-on: https://chromium-review.googlesource.com/930941
Commit-Queue: Kent Tamura <tkent@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#538692}

@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-930941 branch from 91c4030 to 9d1efae Feb 23, 2018

@chromium-wpt-export-bot chromium-wpt-export-bot merged commit 8ec6c8a into master Feb 23, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@chromium-wpt-export-bot chromium-wpt-export-bot deleted the chromium-export-cl-930941 branch Feb 23, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.