const fooHighlight = new Highlight();
CSS.highlights.set("foo", fooHighlight);HighlightRegistry: set() method / notebook
HighlightRegistry: set() method
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
const fooHighlight = new Highlight();
const barHighlight = new Highlight();
const bazHighlight = new Highlight();
CSS.highlights
.set("foo", fooHighlight)
.set("bar", barHighlight)
.set("baz", bazHighlight);