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

Make upgrade an element throw more #4673

Merged
merged 2 commits into from
Jun 11, 2019
Merged

Conversation

annevk
Copy link
Member

@annevk annevk commented Jun 4, 2019

In particular if folks disable support for ShadowRoot and ElementInternals, this will make upgrade an element throw a NotSupportedError so element constructors only run with expected state.

(See WHATWG Working Mode: Changes for more details.)


/custom-elements.html ( diff )
/infrastructure.html ( diff )

In particular if folks disable support for ShadowRoot and ElementInternals, this will make upgrade an element throw a NotSupportedError so element constructors only run with expected state.
@annevk annevk added the topic: custom elements Relates to custom elements (as defined in DOM and HTML) label Jun 4, 2019
Copy link
Contributor

@tkent-google tkent-google left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.
I was going to make a PR like this. Thanks!

I'll make a WPT PR.

source Show resolved Hide resolved
@tkent-google
Copy link
Contributor

Test PR: web-platform-tests/wpt#17162

Copy link
Member

@EdgarChen EdgarChen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@annevk
Copy link
Member Author

annevk commented Jun 7, 2019

Thanks for the review, so attachInternals() can only be invoked if an element already has a definition. We don't require that for attachShadow() unfortunately, which is why it needs to have this separate check at upgrade time. I will update this PR and also add a note to point out this unfortunate design discrepancy.

@annevk annevk merged commit c512c95 into master Jun 11, 2019
@annevk annevk deleted the annevk/adjust-upgrade-an-element branch June 11, 2019 08:24
annevk pushed a commit to web-platform-tests/wpt that referenced this pull request Jun 11, 2019
aarongable pushed a commit to chromium/chromium that referenced this pull request Jun 13, 2019
…ding

Specification PR: whatwg/html#4673

Bug: 972951
Change-Id: I9e3db95eb15e2e40d9e3412e97873f795cc7b028
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1657521
Reviewed-by: Hayato Ito <hayato@chromium.org>
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#668768}
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Jun 19, 2019
…failure due to non-null shado…, a=testonly

Automatic update from web-platform-tests
HTML: test upgrade custom element failure due to disabledFeatures

Specification PR: whatwg/html#4673.
--

wp5At-commits: a3dcc65d854e242e61aeb1c68c26742cd278ea9a
wpt-pr: 17162
xeonchen pushed a commit to xeonchen/gecko that referenced this pull request Jun 19, 2019
…failure due to non-null shado…, a=testonly

Automatic update from web-platform-tests
HTML: test upgrade custom element failure due to disabledFeatures

Specification PR: whatwg/html#4673.
--

wp5At-commits: a3dcc65d854e242e61aeb1c68c26742cd278ea9a
wpt-pr: 17162
marcoscaceres pushed a commit to web-platform-tests/wpt that referenced this pull request Jul 23, 2019
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Oct 4, 2019
…failure due to non-null shado…, a=testonly

Automatic update from web-platform-tests
HTML: test upgrade custom element failure due to disabledFeatures

Specification PR: whatwg/html#4673.
--

wp5At-commits: a3dcc65d854e242e61aeb1c68c26742cd278ea9a
wpt-pr: 17162

UltraBlame original commit: d029a500f958bb1754e910cabdb554615bd43064
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Oct 4, 2019
…failure due to non-null shado…, a=testonly

Automatic update from web-platform-tests
HTML: test upgrade custom element failure due to disabledFeatures

Specification PR: whatwg/html#4673.
--

wp5At-commits: a3dcc65d854e242e61aeb1c68c26742cd278ea9a
wpt-pr: 17162

UltraBlame original commit: d029a500f958bb1754e910cabdb554615bd43064
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Oct 4, 2019
…failure due to non-null shado…, a=testonly

Automatic update from web-platform-tests
HTML: test upgrade custom element failure due to disabledFeatures

Specification PR: whatwg/html#4673.
--

wp5At-commits: a3dcc65d854e242e61aeb1c68c26742cd278ea9a
wpt-pr: 17162

UltraBlame original commit: d029a500f958bb1754e910cabdb554615bd43064
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: custom elements Relates to custom elements (as defined in DOM and HTML)
Development

Successfully merging this pull request may close these issues.

4 participants