We should add a .onLoad method to the API. The reason for this is that, on the master, we often want to execute things on window.load or on document.ready. If we use a single file for both master and remote, that code is never execute on remotes, since the window is loaded before the JS files are loaded via Connichiwa.loadScript. Therefore, Connichiwa.onLoad should execute on window.load on masters and immediately on remotes.
We should add a
.onLoad
method to the API. The reason for this is that, on the master, we often want to execute things onwindow.load
or ondocument.ready
. If we use a single file for both master and remote, that code is never execute on remotes, since the window is loaded before the JS files are loaded viaConnichiwa.loadScript
. Therefore,Connichiwa.onLoad
should execute onwindow.load
on masters and immediately on remotes.