BlackWolf / Connichiwa

A framework for local multi-device web applications
15 stars 0 forks source link

Add Connichiwa.onLoad to the API #89

Closed BlackWolf closed 9 years ago

BlackWolf commented 10 years ago

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.