I'm getting the following firefox errors when adding any javascript
code at all to my callback function that I pass into
nsIObserverService:

Error: [Exception... "'Permission denied to get property
XULElement.accessKey' when calling method:
[nsIDOMXULLabelElement::accessKey]"  nsresult: "0x8057001e
(NS_ERROR_XPC_JS_THREW_STRING)"  location: "JS frame ::
file:///C:/cvs/ffhiqtest/kdx_wrapper.js :: anonymous :: line 1033"
data: no]
Source File: file:///C:/cvs/ffhiqtest/kdx_wrapper.js
Line: 1033

Error: [Exception... "'Permission denied to get property
XULElement.disabled' when calling method:
[nsIDOMXULControlElement::disabled]"  nsresult: "0x8057001e
(NS_ERROR_XPC_JS_THREW_STRING)"  location: "JS frame ::
file:///C:/cvs/ffhiqtest/kdx_wrapper.js :: anonymous :: line 1033"
data: no]
Source File: file:///C:/cvs/ffhiqtest/kdx_wrapper.js
Line: 1033

Here is the javascript code:

var myObserver = { observe : function(subject, topic, data)
{
  if (topic =="DISPID_SECURE_KDXAPIEVENT_CUSTOMEVENT")
  {
     //alert("DISPID_SECURE_KDXAPIEVENT_CUSTOMEVENT");
     //var dataArray = data.split("|");
     //var newTopic =dataArray[0];
     //var newData = dataArray[1];
     //alert(newTopic);
     //alert(newData);
     //gInstance.OnCustomEvent(newTopic,newData);
   }
};

// register the observer
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var observerService =
Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);

observerService.addObserver(myObserver,"DISPID_SECURE_KDXAPIEVENT_CUSTOMEVENT",
false);

**********************
The observer service and implementation of it works fine; up to the
point I try and add some code into the conditional if statement. Notice
that all my javascript is commented out inside the if statement.  If I
uncomment any of them, I generate the set of errors I posted. As this
part of code is handling events, this code is getting run alot, and the
firefox error console lights up like a christmas tree. Just in time for
the holidays.

Now I've looked and looked and looked, and the only reference and fix
that I can find related to these error messages apply to assiging
'autocomplete=off' to your input elements.  However, I don't have a
single input element on my page.

As this seems to point to some fundamental firefox security issue, I
think the only way to find the answer is through this forum. I tried
enabling all the remaining PrivelageManagers to no avail.  I still have
to figure out how to stop the users from being prompted about security
when I use my existing 'UniversalXPConnect' enable.

Anyways, any guru help would be much appreciated. 

-Rob

_______________________________________________
dev-tech-xpcom mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-xpcom

Reply via email to