On 6 Apr., 15:01, Thomas Ritter wrote:
> Hi,
>
> I would like to provide a special Javascript function for an HTML page
> displayed in a element using ThunderBrowse.
>
> Background: I have a webpage for selecting something and I want to trigger
> code in my TB extension when a table row is being clicked. To make it
> short, I want to misuse an HTML page as a dialog.
>
> Is that possible? I tried to add stuff to the browser element using
>
> * * * * var browser = document.getElementById("ext-messagepane");
> * * * * var browserwin = browser.contentWindow;
> * * * * var doc = browser.contentDocument;
>
> * * * * browser.huba = function() { alert("Yay!") };
> * * * * browserwin.huba = function() { alert("Yay!") };
> * * * * doc.huba = function() { alert("Yay!") };
>
> But that doesn't work. Do the security settings disallow that?


Try to include this in your script:
netscape.security.PrivilegeManager.enablePrivilege
("UniversalXPConnect");