johnfactotum / foliate-js

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

Consider the CSS Custom Highlight API #21

Open johnfactotum opened 7 months ago

johnfactotum commented 7 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.