johnfactotum / foliate-js

Render e-books in the browser
https://johnfactotum.github.io/foliate-js/reader.html
MIT License
318 stars 43 forks source link

Consider the CSS Custom Highlight API #21

Open johnfactotum opened 3 months ago

johnfactotum commented 3 months ago

https://developer.mozilla.org/en-US/docs/Web/API/CSS_Custom_Highlight_API

It can replace foliate-js's overlayer. But there are a couple of drawbacks:

It's probably a good fit for search highlighting. Less so for annotations, at least not until text-decoration is supported.