css-highlight-api.idl (985B)
1 // GENERATED CONTENT - DO NOT EDIT 2 // Content was automatically extracted by Reffy into webref 3 // (https://github.com/w3c/webref) 4 // Source: CSS Custom Highlight API Module Level 1 (https://drafts.csswg.org/css-highlight-api-1/) 5 6 enum HighlightType { 7 "highlight", 8 "spelling-error", 9 "grammar-error" 10 }; 11 12 [Exposed=Window] 13 interface Highlight { 14 constructor(AbstractRange... initialRanges); 15 setlike<AbstractRange>; 16 attribute long priority; 17 attribute HighlightType type; 18 }; 19 20 partial namespace CSS { 21 readonly attribute HighlightRegistry highlights; 22 }; 23 24 [Exposed=Window] 25 interface HighlightRegistry { 26 maplike<DOMString, Highlight>; 27 }; 28 29 partial interface HighlightRegistry { 30 sequence<HighlightHitResult> highlightsFromPoint(float x, float y, optional HighlightsFromPointOptions options = {}); 31 }; 32 33 dictionary HighlightHitResult { 34 Highlight highlight; 35 sequence<AbstractRange> ranges; 36 }; 37 38 dictionary HighlightsFromPointOptions { 39 sequence<ShadowRoot> shadowRoots = []; 40 };