Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

firefox + loading script from file = not well-formed message #36

Closed
RedAdder opened this Issue Mar 24, 2012 · 5 comments

Comments

4 participants

I get not well-formed messages in the javascript log when working with a html+js page on the file system.
It might be related to firefox attempting to parse the ajax response as JSON.

I tried to find a workaround, but except turning the function name feature off (which is working), I didn't find a solution.

This seems to work, at least for me:
if(url.indexOf("file://")==0 && typeof(req.overrideMimeType=='function')) req.overrideMimeType("text/javascript");

Contributor

victor-homyakov commented Mar 28, 2012

Can you post file, on which you get this error?

Also can you try req.responseType='text'; right after req.open('GET', url, false);

NodeGuy commented Sep 14, 2012

RedAdder's solution worked for me too.

victor-homyakov, I tried your suggestion and got the following error message:

Use of XMLHttpRequest's responseType attribute is no longer supported in the synchronous mode in window context. @ file:///javascript-stacktrace/stacktrace.js:308

Contributor

victor-homyakov commented Sep 15, 2012

OK, I'll look into this problem more closer.

@eriwen eriwen removed the waffle:ready label Oct 7, 2014

Owner

eriwen commented Nov 17, 2014

This looks like it was a problem with using synchronous ajax for guessing function names. This should be fixed for v1.0.

@eriwen eriwen closed this Nov 17, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment