]> git.proxmox.com Git - mirror_novnc.git/commit - vnc_auto.html
Refactor dynamic script loading. Add util.js:load_scripts()
authorJoel Martin <github@martintribe.org>
Wed, 17 Oct 2012 16:47:07 +0000 (11:47 -0500)
committerJoel Martin <github@martintribe.org>
Wed, 17 Oct 2012 16:58:12 +0000 (11:58 -0500)
commit6f4b1e4071192589f40047d26407a4fce6386578
tree0f6b0e70724f099cc3a97844456db55ed7f3950d
parent7a6c94b6b93a5277575e9d43fa107f71b52a5e1b
Refactor dynamic script loading. Add util.js:load_scripts()

Related to issue/pulls:
https://github.com/kanaka/noVNC/issues/194
https://github.com/kanaka/noVNC/pull/201
https://github.com/kanaka/noVNC/pull/202

In IE9, the window.onload event can fire before dynamically loaded
scripts have finished loading. This can result in either WebSocket (in
the case of vnc_auto.html) or RFB (in the case of vnc.html) not being
defined at the point when window.onload is called.

- Move the load_scripts routine from vnc.js to util.js (so that
  websockify can use it too). Also, refactor to work when load_scripts
  is called by a script that itself uses load_scripts. When the whole
  chain of dynamically loaded scripts is finished then call
  window.onscriptsload. Use this mechanism in all the places that
  depend on dynamic loading of scripts: vnc.html, vnc_auto.html,
  websock.js, tests/vnc_playback.html, and tests/vnc_perf.html.

- Use the new window.onscriptsload handler instead of window.onload.

- Remove include/start.js and do the script loading and startup event
  handling in include/ui.js instead.
debian/novnc.install
include/rfb.js
include/start.js [deleted file]
include/ui.js
include/util.js
include/vnc.js [deleted file]
include/websock.js
tests/vnc_perf.html
tests/vnc_playback.html
vnc.html
vnc_auto.html