Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The add()
method of the Highlight
interface adds a new Range
object to a highlight, to be styled using the CSS Custom Highlight API.
Highlight
is a Set
-like object, so this is similar to using Set.add()
.