Browse Source

Add example with multiple targets to demo.

As the polyfill uses the window’s selection to highlight the target(s),
this only works in Firefox, as other browsers do not support selections
having multiple ranges.
tags/v0.1.0-src
Gerben 8 months ago
parent
commit
08cd7a7d0f
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      demo.html

+ 3
- 0
demo.html View File

@@ -89,6 +89,9 @@
<li>
<a href="#:~:text=Aliquam%20urna,scelerisque.">Text between two phrases in different block elements</a>
</li>
<li>
<a href="#:~:text=Phasellus%20tempus%20dui&text=venenatis%20leo&text=ipsum,-eget">Multiple pieces of text (only works in Firefox)</a>
</li>
<li>
<a href="#:~:text=GATTACA,CATATTAC">Select text between start and end of a long, uninterrupted string <em>(fails)</em></a>
</li>


Loading…
Cancel
Save