-
Notifications
You must be signed in to change notification settings - Fork 23k
Add shadow root reference target information #42323
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -38,6 +38,8 @@ You can retrieve a reference to an element's shadow root using its {{domxref("El | |||||
| - {{DOMxRef("ShadowRoot.pointerLockElement")}} {{ReadOnlyInline}} | ||||||
| - : Returns the {{DOMxRef('Element')}} set as the target for mouse events while the pointer is locked. | ||||||
| `null` if lock is pending, pointer is unlocked, or if the target is in another tree. | ||||||
| - `ShadowRoot.referenceTarget` {{ReadOnlyInline}} {{Experimental_Inline}} | ||||||
| - : A string value that indicates the effective target of any element reference made against the shadow host from outside the host element. | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| - {{DOMxRef("ShadowRoot.serializable")}} {{ReadOnlyInline}} | ||||||
| - : A boolean that indicates whether the shadow root is serializable. | ||||||
| A serializable shadow root inside an element will be serialized by {{DOMxRef('Element.getHTML()')}} or {{DOMxRef('ShadowRoot.getHTML()')}} when its [`options.serializableShadowRoots`](/en-US/docs/Web/API/Element/getHTML#serializableshadowroots) parameter is set `true`. | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,6 +38,9 @@ This element includes the [global attributes](/en-US/docs/Web/HTML/Reference/Glo | |
| If this is set and a non-focusable element in the shadow tree is selected, then focus is delegated to the first focusable element in the tree. | ||
| The value defaults to `false`. | ||
|
|
||
| - `shadowrootreferencetarget` {{Experimental_Inline}} | ||
| - : Sets the value of the `referenceTarget` property of a [`ShadowRoot`](/en-US/docs/Web/API/ShadowRoot) created using this element. The value should be the ID of an element inside the shadow DOM. If set, target references to the host element from outside the shadow DOM will cause the referenced target element to become the effective target of the reference to the host element. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I think this wording is great, how would you feel about including it for each of these brief descriptions? |
||
|
|
||
| - `shadowrootserializable` | ||
| - : Sets the value of the [`serializable`](/en-US/docs/Web/API/ShadowRoot/serializable) property of a [`ShadowRoot`](/en-US/docs/Web/API/ShadowRoot) created using this element to `true`. | ||
| If set, the shadow root may be serialized by calling the {{DOMxRef('Element.getHTML()')}} or {{DOMxRef('ShadowRoot.getHTML()')}} methods with the `options.serializableShadowRoots` parameter set `true`. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.