Piedone
Piedone

Reputation: 2888

Ace editor, javascript flavor: "Failed to load script" exception

I try to use the Ace editor with javascript highlighting, like this:

editor.getSession().setMode("ace/mode/javascript");

"editor" is a valid editor instance, working with PHP or C#. However, from this line I get an exception, what shows up on the Firebug console like this:

uncaught exception: [xpconnect wrapped native prototype]

Failed to load script: http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/worker-javascript.js (nsresult = 0x805303f4)

I'm using the CDN version of the editor, that's why the cloudfront url. Basically my code is the same as in the Ace embedding sample.

What is going wrong? Any help would be appreciated.

Upvotes: 3

Views: 1442

Answers (1)

a user
a user

Reputation: 24104

ace tries to load that into webWorker and fails because of crossorigin script restrictions

Upvotes: 2

Related Questions