devpunks / snuggsi

snuggsi ツ - Easy Custom Elements in ~1kB
https://snuggsi.com
MIT License
398 stars 17 forks source link

Test case for <option {selected}> #18

Open snuggs opened 7 years ago

snuggs commented 7 years ago

We TreeWalk attributes but do not check for the case where the attribute name is the token.

<option {selected}>foo</option>
snuggs commented 7 years ago

@VicenteRD confirmed it. We NEED this feature if we want to have logical display of elements within the page.

Am curious @VicenteRD does an <img src='' hidden> make a network request for the (blank) resource?

snuggs commented 7 years ago

@VicenteRD seems like src='' DOES NOT attempt to fetch a blank resource. I guess we got the green light ✅

snuggs commented 7 years ago

capture d ecran 2017-04-26 a 02 26 56

snuggs commented 7 years ago

capture d ecran 2017-04-26 a 02 33 30

Seems like empty src='' works in browsers but breaks the spec.

Can also use Data URIs as a "default" but not sure what one. @VicenteRD that's our homework.