Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
104
rated 0 times [  105] [ 1]  / answers: 1 / hits: 55885  / 12 Years ago, sun, may 13, 2012, 12:00:00

I'm making a Greasemonkey script and would like to open a new tab which will not display a URL but some HTML that is part of the script. So basically I want to do something like this (which is obviously not working):



window.open('<html><head></head><body></body></html>');
or
GM_openInTab('<html><head></head><body></body></html>');


Any hints are welcome!


More From » jquery

 Answers
1

You can do this:



var newWindow = window.open();



and then do



newWindow.document.write(ohai);


[#85613] Friday, May 11, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
austonjuancarlosb

Total Points: 238
Total Questions: 89
Total Answers: 99

Location: Chad
Member since Mon, Dec 5, 2022
1 Year ago
;