4 ms·
Oh, you are right! Hmm .. and the approach already shows its weaknesses when I play with it: When I search for something on the page, it gives me twice as many
by mg 10mo ago
Oh, you are right!
Hmm .. and the approach already shows its weaknesses when I play with it: When I search for something on the page, it gives me twice as many hits as there are. And jumps around two times to each hit when I use the "next" button.
I wonder if that is fixable.
- knallfrosch 10mo agoOne simply needs the Highlight API. I held back, but now even Firefox ESR supports it. https://developer.mozilla.org/en-US/docs/Web/API/Highlight https://developer.mozilla.org/en-US/docs/Web/API/Highlight All the trickery vanishes and you get first-class CSS support.
- debazel 10mo agoThere is a neat `inert` html attribute you can use to disable all interactions as well as hide the text from ctrl+f searches. (Sadly Safari is the weird one out, and does not exclude the content from searches.) https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/inert https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/...
- fsfod 10mo agoGitHub had to solve the same problem when speeding up there code viewer. https://github.blog/engineering/architecture-optimization/crafting-a-better-faster-code-view/ https://github.blog/engineering/architecture-optimization/cr...