Use loadingCompiler event for setVersionText (also display if using worker)

pull/1/head
Alex Beregszaszi 8 years ago
parent ee483e655c
commit b55d3f054e
  1. 5
      src/app.js

@ -444,6 +444,10 @@ var run = function () {
compiler.compile(); compiler.compile();
}); });
compiler.event.register('loadingCompiler', this, function (url, usingWorker) {
setVersionText(usingWorker ? '(loading using worker)' : '(loading)');
});
compiler.event.register('compilerLoaded', this, function (version) { compiler.event.register('compilerLoaded', this, function (version) {
setVersionText(version); setVersionText(version);
compiler.compile(); compiler.compile();
@ -472,7 +476,6 @@ var run = function () {
} }
function loadVersion (version) { function loadVersion (version) {
setVersionText('(loading)');
queryParams.update({version: version}); queryParams.update({version: version});
if (window.soljsonReleases !== undefined && window.soljsonReleases[version] !== undefined) { if (window.soljsonReleases !== undefined && window.soljsonReleases[version] !== undefined) {
version = window.soljsonReleases[version]; version = window.soljsonReleases[version];

Loading…
Cancel
Save