Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.
Hi all, please see this major site announcement: https://www.boards.ie/discussion/2058427594/boards-ie-2026

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