On 30/07/2024 23:25, Benjamin Young wrote:
I'm pretty confident these have been mentioned before, but thought I'd
resurface them in a new thread:
https://developer.mozilla.org/en-US/docs/Web/API/Highlight
https://developer.mozilla.org/en-US/docs/Web/API/HighlightRegistry
Highlight takes ranges...which are hard for any mere mortal to create...unless
they use Apache Annotator! ;)
At any rate, I think putting a demo together that uses the Highlight API instead of
<mark> would be useful, educational, and awesome.
Note Randall had ambitions around this Highlight API:
https://github.com/apache/incubator-annotator/pull/135#issuecomment-2081254311
I had not looked into it yet, but it seems a good match indeed. Mark
elements could indeed be used as a fallback.