Wait for DOM ready before initialising pre existing elements

There was inconsistent behaviour when this occurred in the <head> script tag, due to the debounce providing a timeout.

This caused problems in IE (sometimes execution was slow enough that by the time the timeout was complete, the DOM was still not ready.)