This commit makes vnc_playback.html functional once more, and completely
refactors tests/playback.js to make it usable in other scenarios.
In order for vnc_playback.js to properly load playback files now, they
must `export` their variables.
This commit fixes `vnc_auto.html` to work with the new changes.
Note that it is not translated over when `--with-app` is used
on `util/use_require.js`. We'll probably want to deprecate it,
or do some longer-term cleanup.
This commit moves the global error handler into a separate file,
so that it can catch module loading errors.
This also adds support for properly displaying error messages with
newlines in them (since the module loader may throw those)
This commit makes the ES6 module loader polyfill use Web Workers,
so that Babel doesn't block the browser from animating. It also
uses localStorage to cache the compiled results, only recompiling
on source changes, so it makes loading faster while developing noVNC.
This includes a vendored copy of the ES6 module loader, modified as
described above.
This updates the tests to work with the new structure, and removes the
old `utils/run_from_console.js` files in favor of just using Karma
directly. The Karma debug page now displays the normal mocha HTML, so
we can use that instead of the HTML generation functionality of the old
test runner.
Note that PhantomJS does not work at the moment (PhantomJS 1.5 should
make it possible to test on PhantomJS again).
This commit restructures many of the ES6 modules, splitting them
up to actual export multiple functions instead of a single object.
It also splits up Util into multiple sub-modules, to make it easier
to maintain.
Finally, localisation is renamed to localization.
The only remaining user of WebUtil.load_scripts was for loading
localisation. Instead, we now load the localization information
over XHR as a JSON blob.
This changes around `utils/use_require.js` to be able to generate any
of AMD (RequireJS), CommonJS, SystemJS, or UMD modules. The three
former also include support for translating `vnc.html`, producing a full
"app" version of noVNC.
The browsers' support for Microsoft's cursor format is a bit spotty,
so use the more common PNG format instead. This also allows us to
use a Canvas to generate the image, rather than coding it by hand.
This commit introduces the "Browser ES Module Loader" polyfill
to support developing with native ES6 modules, without any compilation
step (files are passed through Babel in the browser). This should not
be used in production -- a pre-compiled version passed through babel
ahead of time (as produced by the `npm install` hook or
`utils/use_require.js`) should be used instead.
This removes the special comment part of the ES6 module syntax,
opting to enable ES6 module syntax by default.
It also appends `.js` to all import paths to better support in-browser
loading.
`app/ui.js` had an incorrect import path which caused issues
when using the ES6 and/or CommonJS builds of noVNC.
`core/util.js` had a non-strict-compatible declaration of a variable
without a `let` or `var` (it now uses `let`).
This fixes both issues.
It is not a launcher icon, but rather used for display on Google
Play. As such it is not needed and removing it mitigates the issue
of some buggy browsers downloading each and every listed icon.