1. Cat's Eye Technologies
  2. Pixley

Commits

Cat's Eye Technologies  committed e99e8a8

Allow dependency injection of the URL of the Web Worker script.

  • Participants
  • Parent commits 7ae4307
  • Branches default

Comments (0)

Files changed (1)

File impl/pixley.js/src/pixley-controller.js

View file
         this.pixleyInterpreter = cfg.pixleyInterpreter || '???';
         this.display = cfg.display;
         this.output = cfg.output;
+        this.workerURL = cfg.workerURL || "../src/pixley-worker.js";
         this.setStatus('Ready.');
     };
 
     this.start = function() {
         this.setStatus('Evaluating...');
 
-        this.worker = new Worker("../src/pixley-worker.js");
+        this.worker = new Worker(this.workerURL);
         var $this = this;
         this.worker.addEventListener('message', function(e) {
             $this.output.innerHTML = e.data;