3

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.

2
  • I'm actually getting the same thing.. did you every find an actual resolution to this? Was the fix just 'sucking it up and downloading the library instead of using off the cdn'? Commented Nov 29, 2012 at 7:05
  • Actually it was simpler than that: I asked this question because ACE was not loading for me because of this exception. After a while (like two days) it was loading again, although the exception remained (I don't know if there was a change in code). So all in all the editor works for me fully, but throws this exception... Commented Nov 29, 2012 at 19:14

1 Answer 1

2

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

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks! But it's strange: when I opened this question the script failed with this exception, now I get it too, but the script runs. Anyway, I guess having this exception is not a good thing, right? :-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.