-
Notifications
You must be signed in to change notification settings - Fork 294
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
ShadowRoot's delegatesFocus #931
Comments
Readonly attribute? |
I assume so (and so it wouldn't require more than fairly minimal changes to the spec, to essentially just expose the value of the internal flag which is already there). |
https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/core/dom/shadow_root.idl has |
I guess the attribute shouldn't be harmful, even if if wasn't used frequently. |
Yeah looks like this was added in the initial impl of delegatesFocus but wasn't part of the explainer. Sounds reasonable to keep around. |
This change marks ShadowRoot.prototype.delegatesFocus standard_track:false and deprecated:true. https://dom.spec.whatwg.org/#interface-shadowroot doesn’t actually define any such exposed property — neither for ShadowRoot nor for the interfaces it inherits from. Blink/Chrome does expose such a property, but that’s not due to any actual spec requirements. Related: mdn/sprints#3917 whatwg/dom#931
I'll be in the favor for adding this readonly attribute to make the API more interoperable. I don't think trying to remove it in Blink is productive course of action given there isn't really a downside to it. Tangentially, maybe we should make it writeable. There isn't much downside to making it possible to update this flag after shadow root creation but we should probably track that in a separate issue once this is addressed. |
I noticed this today as well, so I sent #974 + web-platform-tests/wpt#28593, and I've filed #975 about making the attribute mutable. |
This has been implemented in WebKit as of https://trac.webkit.org/r276585 |
Yay, thanks @rniwa! |
whatwg/dom#974 added ShadowRoot.prototype.delegatesFocus to the DOM spec (see whatwg/dom@f346858). And per whatwg/dom#931 (comment) (https://trac.webkit.org/r276585) it’s been implemented in WebKit. So given that now it’s part of the DOM standard, and implemented in multiple browsers, this changes resets the BCD status flags for it.
whatwg/dom#974 added ShadowRoot.prototype.delegatesFocus to the DOM spec (see whatwg/dom@f346858). And per whatwg/dom#931 (comment) (https://trac.webkit.org/r276585) it’s been implemented in WebKit. So given that it’s now part of the DOM standard, and implemented in multiple browsers, this changes resets the BCD status flags for it.
whatwg/dom#974 added ShadowRoot.prototype.delegatesFocus to the DOM spec (see whatwg/dom@f346858). And per whatwg/dom#931 (comment) (https://trac.webkit.org/r276585) it’s been implemented in WebKit. So given that it’s now part of the DOM standard, and implemented in multiple browsers, this change resets the BCD status flags for it.
whatwg/dom#974 added ShadowRoot.prototype.delegatesFocus to the DOM spec (see whatwg/dom@f346858). And per whatwg/dom#931 (comment) (https://trac.webkit.org/r276585) it’s been implemented in WebKit. So given that it’s now part of the DOM standard, and implemented in multiple browsers, this change drops the Deprecated_Header macro from the source — as well as fixing the spec URL.
whatwg/dom#974 added ShadowRoot.prototype.delegatesFocus to the DOM spec (see whatwg/dom@f346858). And per whatwg/dom#931 (comment) (https://trac.webkit.org/r276585) it’s been implemented in WebKit. So given that it’s now part of the DOM standard, and implemented in multiple browsers, this change drops the Deprecated_Header macro from the source — as well as fixing the spec URL. Related BCD change: mdn/browser-compat-data#10102
whatwg/dom#974 added ShadowRoot.prototype.delegatesFocus to the DOM spec (see whatwg/dom@f346858). And per whatwg/dom#931 (comment) (https://trac.webkit.org/r276585) it’s been implemented in WebKit. So given that it’s now part of the DOM standard, and implemented in multiple browsers, this change resets the BCD status flags for it. Related MDN change: mdn/content#4508
whatwg/dom#974 added ShadowRoot.prototype.delegatesFocus to the DOM spec (see whatwg/dom@f346858). And per whatwg/dom#931 (comment) (https://trac.webkit.org/r276585) it’s been implemented in WebKit. So given that it’s now part of the DOM standard, and implemented in multiple browsers, this change resets the BCD status flags for it. Related MDN change: mdn/content#4508
whatwg/dom#974 added ShadowRoot.prototype.delegatesFocus to the DOM spec (see whatwg/dom@f346858). And per whatwg/dom#931 (comment) (https://trac.webkit.org/r276585) it’s been implemented in WebKit. So given that it’s now part of the DOM standard, and implemented in multiple browsers, this change drops the Deprecated_Header macro from the source — as well as fixing the spec URL. Related BCD change: mdn/browser-compat-data#10102
@sideshowbarker discovered that Chrome exposes
delegatesFocus
onShadowRoot
. This hasn't really appeared in any specification as far as I can tell (e.g., dglazkov-era's https://www.w3.org/TR/2015/WD-shadow-dom-20151215/#the-shadowroot-interface doesn't have it), but given that we expose other state that can be set when creating a shadow root, such asmode
, it might well be reasonable to add.@rniwa @smaug---- @rakina thoughts?
The text was updated successfully, but these errors were encountered: