react icon indicating copy to clipboard operation
react copied to clipboard

Remove the selector template from the DOM

Open pento opened this issue 8 years ago • 1 comments

This avoids any UAs accessing the elements before they're ready to be used - a misbehaving screen reader trying to read alt text prematurely, for example.

Wrapping it in a <script type="text/html"> tag should do the trick.

Props @peterwilsoncc for the suggestion.

pento avatar Mar 10 '16 00:03 pento

This can be done with the <template> tag from web-components spec, now..

lucyllewy avatar Jul 31 '19 20:07 lucyllewy