I have developed a xpcom component using c++. I have GetHWND() method in my component. I have also developed another xpcom component using javascript. I want to make use of GetHWND function in javascript xpcom component. I am using following code to do so.
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var myComponent = Components.classes['@dougt/WebLock'].createInstance(Components.interfaces.IWebLock);
myComponent = myComponent.QueryInterface(Components.interfaces.IWebLock);
var res = myComponent.GetHWND(mainWindow.content.document);
But it is giving error as "ReferenceError: netscape is not defined". I did google search but did not find the solution to it.
I am using Mozilla Firefox and I want it to get worked for the same.
Please help me to come out of this problem. Thanks in advance.