开发者

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 ne开发者_StackOverflow中文版gative, if that is required.


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


If you want to do it your way (instead of Google's way), perhaps this would work for you.

Cross Browser JavaScript DOMContentLoaded

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜