Back to Content

Highlight: keys() method

files/en-us/web/api/highlight/keys/index.md

latest779 B
Original Source

{{APIRef("CSS Custom Highlight API")}}

The keys() method of the {{domxref("Highlight")}} interface is an alias for the {{domxref("Highlight.values()", "values()")}} method.

Highlight is a {{jsxref("Set")}}-like object, so this is similar to using {{jsxref("Set.keys()")}}.

Syntax

js-nolint
keys()

Parameters

None.

Return value

A new iterator object containing each Range object in the given Highlight, in insertion order.

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}

See also