pento / react

x1f4a9 Reactions.
GNU General Public License v2.0
28 stars 10 forks source link

Remove the selector template from the DOM #10

Open pento opened 8 years ago

pento commented 8 years ago

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.

lucyllewy commented 5 years ago

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