Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

XUL/Javascript virtual function problem

  • 18-12-2005 10:20PM
    #1
    Closed Accounts Posts: 17,208 ✭✭✭✭


    I'm trying to port someone else's extension over to FF1.5.

    My code is like this:
    function foo(x, y, z){ }
    
    function bar(){
    	var alice = window._content.document.createElement("a");
    	alice.onClick = function() { foo(x, y, z); return false; };
    }
    

    When I run this it gets as far as alice.onClick and then throws a "Component is not available" exception. I suspect that this is to do with XPCNativeWrappers for the extension, but I have no idea how to get around it so that I can use the virtual function. I have Googled, but I can't find anything that lets me know what the default names for XPCNativeWrappers created by FF might be.

    Or does anyone have a suggestion on how I can get around this another way?


Advertisement