thlorenz / brace

📔 browserify compatible version of the ace editor.
http://thlorenz.github.io/brace/
MIT License
1.06k stars 304 forks source link

php_worker throws error #140

Open osster opened 5 years ago

osster commented 5 years ago

File: node_modules/brace/mode/php.js that line throws error: "Could not load worker TypeError: "name is undefined""

this.createWorker = function(session) {
    var worker = new WorkerClient(["ace"], "ace/mode/php_worker", "PhpWorker");

when I replaced line like this:

this.createWorker = function(session) {
    var worker = new WorkerClient(["ace"], "ace/mode/php_worker", "PhpWorker", "ace/mode/php");

its worked for me, but maybe I missing something? I'm using firefox developer edition browser, win10

DylanT-sd commented 5 years ago

I encountered a similar bug. Solved it by making the following change: var worker = new WorkerClient(["ace"], {id:"ace/mode/php_worker"}, "PhpWorker");