Hi All,

I tried following code to open a pop up window and then writing its
TITLE and HTML property. I am able to successfully write the TITLE but
i am getting security error while writing HTML in the pop up window.
Here is my code:
====================================================
// ==UserScript==
// @name          mytest
// @namespace     sourabh_shankar_gm
// @description   my first gm script
// @include       *
// @version       1.0 alpha
// ==/UserScript==

GM_log('starting gm script...');

var myWindow=window.open('','','width=300,height=200');

var contentWrapper = new XPCNativeWrapper(myWindow, 'doc');
var docWrapper = new XPCNativeWrapper(contentWrapper.document,
'title', 'open()' ,'write()', 'close()');
docWrapper.title='this is title';
docWrapper.open();
docWrapper.write('<html><head></head><body><h1>ssss</h1></body></
html>');
docWrapper.close();
====================================================
Can anyone please tell me what i am doing wrong?

TIA

-- 
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