Click here to Skip to main content
13,056,229 members (70,875 online)
Rate this:
Please Sign up or sign in to vote.
I am building an Extension in firefox which checks the navigated URL, compares it to a list of locally blocked URL's and then decides to block or proceed on with the call.

In order to keep the user occupied, i am trying to use JQuery's blockUI function to block the page till the results of my comparison are complete. However, for some reason, Firefox fires an exception every time i call the blockUI NotSupportedError: Operation is not supported.

The following is my XUL Code
<?xml version="1.0"?>
<?xml-stylesheet href="...." type="text/css"?> 
<!DOCTYPE TestExtension SYSTEM "...">
<overlay id="sample" xmlns="">
		<script src="jquery-1.9.1.js" />
		<script src="jquery.blockUI.js" />
		<script src="background.js" />

The following is how i call the BlockUI within my Background.js
$mb = jQuery.noConflict();
if (flag)
   $mb.blockUI.defaults.applyPlatformOpacityRules = false;
   $mb.blockUI(); // FIRES EXCEPTION

My firefox version is: 20.0

Any Help is greatly appreciated.
Posted 3-Apr-13 7:54am
Updated 3-Apr-13 8:18am
ryanb31 3-Apr-13 14:57pm
Just a dumb observation, but with the doctype who knows what will happen. Is that doctype intentional?
AspDotNetDev 3-Apr-13 14:59pm
Haven't really read your question, but maybe you shouldn't self-close script tags (I don't really know what XUL code is, so maybe it doesn't apply)? I have run into a similar problem before:
Daroosh 4-Apr-13 4:55am
Thanks a lot guys, however, this is how a XUL document should look like. XUL is an XML doc type designed to add UI elements to Firefox using its extensions. So, yes, this is how it should look like.

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Would it be fine for background.js to wrap that offending code within ready block?

   if (flag)
   $mb.blockUI.defaults.applyPlatformOpacityRules = false;
   $mb.blockUI(); // FIRES EXCEPTION
Daroosh 4-Apr-13 4:53am
No it's not possible, since this action is not to be performed when the document is loaded, this is only part of a 4000 Line code extension, and as you might possibly understand, i can't really post the extensions code, this is just the part where the error is triggered. It works perfectly fine on Chrome btw...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170728.5 | Last Updated 3 Apr 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100