dan...@microsoft.com, lusa...@microsoft.com
https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/highlight/events-explainer.md
Spec text pending. IDL is in the explainer here, subject to change:
https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/highlight/events-explainer.md#proposal
Adds pointer event handling to the Custom Highlight API. The Custom Highlight API (see https://chromestatus.com/feature/5436441440026624) provides a way for web developers to style the text of arbitrary ranges. Adding pointer event handling to these highlighted ranges will make them interactive, unlocking features such as a custom spellcheck that shows suggestions when a highlighted spelling error is hovered or clicked.
Blink componentMotivationThe Custom Highlight API (see https://chromestatus.com/feature/5436441440026624) provides a way for web developers to style the text of arbitrary ranges. Adding pointer event handling to these highlighted ranges will make them interactive, unlocking features such as a custom spellcheck that shows suggestions when a highlighted spelling error is hovered or clicked.
Initial public proposalhttps://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/highlight/events-explainer.md
https://github.com/w3c/csswg-drafts/issues/7447
Pending
Pending
There should not be a compat risk with the existing Highlight API, since this is purely additive. If no event listeners are added to Highlights, they will continue working as they do now.
We do have to be careful about changing PointerEvent behavior; for example, PointerEvents currently only have Nodes as their target, so allowing Highlights to be PointerEvent targets could break the expectations of current code. We will need to be mindful of these risks while progressing the design of the feature.
Developers can feature-test by checking for the existence of window.HighlightPointerEvent.
Interoperability and CompatibilityGecko: No signal
WebKit: No signal
Web developers: No signals
Other signals:
None
DebuggablityWe’ll ensure that HighlightPointerEvents are exposed in DevTools’ Event Listeners pane.
No, we'll add WPTs as we prototype the feature and will keep them updated as the spec develops.
HighlightPointerEvents
False
https://bugs.chromium.org/p/chromium/issues/detail?id=1344319
No milestones specified
Link to entry on the Chrome Platform Status