• Joel Martin's avatar
    Refactor dynamic script loading. Add util.js:load_scripts() · 6f4b1e40
    Joel Martin authored
    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.
    6f4b1e40
Name
Last commit
Last update
..
arrays.html Loading commit data...
arrays.js Loading commit data...
base64.html Loading commit data...
base64.js Loading commit data...
browser.js Loading commit data...
canvas.html Loading commit data...
cursor.html Loading commit data...
face.png Loading commit data...
face.png.js Loading commit data...
input.html Loading commit data...
stats.js Loading commit data...
viewport.css Loading commit data...
viewport.html Loading commit data...
vnc_perf.html Loading commit data...
vnc_playback.html Loading commit data...