2 ms·
For sure, and that's a pretty cool feature of this library. Nonetheless they should be checking whether or not there are included templates/designs before gener
by jjcm 6y ago
For sure, and that's a pretty cool feature of this library. Nonetheless they should be checking whether or not there are included templates/designs before generating the shadowroot. I put together a small demo of this in action: https://github.com/jjcm/shadowTests/blob/master/withOptionalShadow.html https://github.com/jjcm/shadowTests/blob/master/withOptional...
The results speak for themselves: https://raw.githubusercontent.com/jjcm/shadowTests/master/resultsForOptionalCreation.png https://raw.githubusercontent.com/jjcm/shadowTests/master/re...
Creating a shadowroot conditionally has nearly equivalent performance to no shadowroot at all, but always creating a shadowroot is about twice as slow.