Stop wrapping search matches in <mark>.
The CSS Custom Highlight API paints them instead:
1. Find the matches with a TreeWalker
2. Turn each one into a Range
3. CSS.highlights.set()
Zero elements added. Every modern browser.
markodenic.tech/highlight-s...
Stop wrapping search matches in <mark>. The CSS Custom Highlight API paints them instead: 1. Find the matches with a TreeWalker 2. Turn each one into a Range 3. CSS.highlights.set() Zero elements added. Every modern browser. markodenic.tech/highlight-s...
0 views
Published on 24/10/2026 13:53
Stop wrapping search matches in <mark>.
The CSS Custom Highlight API paints them instead:
1. Find the matches with a TreeWalker
2. Turn each one into a Range
3. CSS.highlights.set()
Zero elements added. Every modern browser.
markodenic.tech/highlight-s...
0 comments
?