/Web APIs

Highlight: keys() method

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The keys() method of the Highlight interface is an alias for the values() method.

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




Return value

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


Browser compatibility

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari WebView Android Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet
keys 105 105 preview No 91 No 105 105 No 72 No 20.0

See also

© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.