-
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?
Conversation
|
Preview URLs
Flaws (1)Note! 2 documents with no flaws that don't need to be listed. 🎉 URL:
(comment last updated: 2025-12-09 16:28:05) |
| 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 comment
The reason will be displayed to describe this comment to others. Learn more.
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.
I think this wording is great, how would you feel about including it for each of these brief descriptions?
| - : 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 comment
The reason will be displayed to describe this comment to others. Learn more.
| - : A string value that indicates the effective target of any element reference made against the shadow host from outside the host element. | |
| - : A string value that indicates the effective target of any element reference made against the shadow host from outside the host 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. |
| When a non-focusable part of the shadow DOM is clicked, the first focusable part is given focus, and the shadow host is given any available `:focus` styling. Its default value is `false`. | ||
|
|
||
| - `referenceTarget` {{Optional_Inline}} {{Experimental_Inline}} | ||
| - : A string specifying the _reference target_ of any element references made against the host element of the shadow DOM tree. The reference target must be an element held within the shadow DOM. |
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.
| - : A string specifying the _reference target_ of any element references made against the host element of the shadow DOM tree. The reference target must be an element held within the shadow DOM. | |
| - : A string value that indicates the effective target of any element reference made against the shadow host from outside the host 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. |
Description
Adds brief summaries of
referenceTargetonattachShadow()andShadowRoot, andshadowrootreferencetargeton<template>.Motivation
Implemented experimentally in Chrome and positive signals from Mozilla and funding to implement in WebKit as well as progress in the HTML and WHATNOT arenas.
Additional details