Hi, I have designed a web page that opens another arbitary web page
(i.e. could be on a different domain) in a separate window. I need the
new window to report back to its opener when it has finished loading.
I created a test script to see if the opened window could access stuff
on its openers window. Here is my attempt...

==UserScript==
// @name           pageLoaded1
// ==/UserScript==

    window.addEventListener(
        'load',
        function(e){
 
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
            alert(window.opener.document.title);
            },
        false);

This doesnt work as Greasemonkey doesnt like the
'netscape.security...' bit.
I searched the web for help and quickly became overwhelmed with
articles on unsafeWindow and XPCNativeWrapper etc.
Can anyone help me get the above script working.
By the way, I'm not bothered about security risks as I will be running
it in a separte firefox profile on a limited range of websites. I've
written other test pages to verify that I have successfully bypassed
Firefox's 'different origin' restriction etc.
Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"greasemonkey-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/greasemonkey-users?hl=en.

Reply via email to