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 lik
If the other answer gives you Error: Permission denied to access property "document"
, see this question about how to handle same-origin policy problems, or this one.
Or, quick and dirty, use a data URI:
var html = 'ohai';
var uri = "data:text/html," + encodeURIComponent(html);
var newWindow = window.open(uri);