Search code examples
javascriptinitializationgoogle-closure-library

How do I get Google Closure to call my init function when DOM tree finished


I am looking for something like the $(document).ready function in jQuery, as I work on experimenting with using Closure.

So, my question is simple, is there a function I am missing that will allow me to wait until my function is called when the DOM tree is done?

I use unobtrusive javascript, so the idea of putting any javascript in my html is such a negative, if that is required.


Solution

  • Looks like you're out of luck according to this. Inline script blocks appears to be your only choice.