How to make Google Closure call the init function when the DOM tree completes

I am looking for something like a function $(document).readyin jQuery, as I am working on experimenting using Closure.

So my question is simple, is there a function that I'm missing that will let me wait until my function is called when the DOM tree is executed?

I use unobtrusive javascript, so the idea of โ€‹โ€‹putting any javascript in my html is so negative if necessary.

+3
source share
2 answers

You seem unlucky according to this . A script lock is your only choice.

+1
+1

Source: https://habr.com/ru/post/1722292/


All Articles