Skip to content

Comment on Faster than jQuery(document).ready() - Wait Until Exists

Comments

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?

OP 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.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.