I was writing a plugin for firefox in which I generate an html with the page in which the plugin acts and I want to show my html generated in another new page, what I have tried has a form quite similar to the following:
function crearHTML(){
return "<html><head></head><body><p>Hola manola</p></body></html>";
}
function abrirPagina(){
var html = crearHTML();
var dataURL = "data:text/html;base64," + btoa(html);
var w = window.open(dataURL);
}
In theory it should work, but it's like firefox opens the tab and closes it immediately, this does not happen if instead of passing the MIME "text / html" step "text / plain", in which case the page is maintained open but obviously not rendered as I want.
Any idea why this could be happening?