Skip to content Skip to sidebar Skip to footer

Call To $.ajax From Firefox Extension Not Working

I am trying to make a firefox extension that will list all the videos on a page. I had already got it working as a normal js script (not as an extension) so I know the script work

Solution 1:

Have you fully installed the extension? You can't just execute the .xul file, you have to install it properly to let Firefox know you "trust" the extension before letting it do stuff like AJAX requests.

Solution 2:

OK, as SomeKittens requested, I am answering my own question (didn't know I could do that).

The solution to the problem is to change the dataType: 'jsonp', To dataType: 'json'.

I don't know why but FF doesn't seem to support 'jsonp' calls from inside extensions. One thing to note here is that inside FF extensions, you don't need 'jsonp' anyway as the extensions are free to make cross-domain ajax calls. Hope this will help.

I've also provided the answer in the question itself.

Post a Comment for "Call To $.ajax From Firefox Extension Not Working"