HighlightRegistry

The HighlightRegistry interface of the CSS Custom Highlight API is used to register Highlight objects to be styled using the API. It is accessed via CSS.highlights.

MDN Reference

Properties

Link copied to clipboard
open external val size: Int

Functions

Link copied to clipboard
open external override fun clear()
Link copied to clipboard
open external override fun delete(key: JsString): Boolean
Link copied to clipboard
open external fun entries(): JsIterator<Tuple2<JsString, Highlight>>
Link copied to clipboard
open external fun forEach(action: (value: Highlight, JsString) -> Unit)
Link copied to clipboard
open external fun get(key: JsString): Highlight?
Link copied to clipboard
open external fun has(key: JsString): Boolean
Link copied to clipboard
external fun highlightsFromPoint(x: Float, y: Float, options: HighlightsFromPointOptions = definedExternally): ReadonlyArray<HighlightHitResult>

The highlightsFromPoint() method of the HighlightRegistry interface returns an array of objects representing the custom highlights applied at a specific point within the viewport.

Link copied to clipboard
open external fun keys(): JsIterator<JsString>
Link copied to clipboard
open external override fun set(key: JsString, value: Highlight)
Link copied to clipboard
open external fun values(): JsIterator<Highlight>