4 ms·
Why are you comparing this to `jQuery(document).ready()`? Apples and oranges. You say it’s faster, but fail to provide any numbers / a jsPerf test case. I’m su
by mathias 15y ago
Why are you comparing this to `jQuery(document).ready()`? Apples and oranges.
You say it’s faster, but fail to provide any numbers / a jsPerf test case. I’m sure it’s faster to execute `waituntilexists()` initially, but if you take into account it uses an 5ms interval in which it traverses the DOM for the same elements over and over again until they’re finally found, it seems it probably has a negative impact on performance overall.
What’s wrong with event delegation anyway?
- AltIvan 15y agoOP here. The 5ms interval is only used on old versions of Internet Explorer. It uses getElementById to traverse the DOM and it is said to be the faster selector in javascript.