Message from JavaScript discussions

September 2020

— Yah, lots global variables should be forbidden and avoided

— 

Hello, when opening a new tab using window.open(…), the newly opened tab blocks interaction for some reason, be it prompt,alert or print, even the parent tab which opened the tab gets blocked.

— Is it possible to somehow avoid this. i tried opening a link with javascript, but because there is custom html content involved i have to use data uri, and apparently chrome blocks opening data uri as links

Message permanent page

— Https://groups.google.com/a/chromium.org/g/blink-dev/c/GbVcuwg_QjM
regarding chrome blocking data uris

Message permanent page

— What i’m trying to achieve is print a custom html doc without blocking the page interaction, as i have idb transactions open and i dont want them to be aborted due to timeout

Message permanent page

— The user has to click the pop-up once

— Currently i’m doing this:

var newWin= window.open("",'','target=_blank');
newWin.document.write(result);
newWin.document.close()


where result is html as string and the following script at the end:

window.print();
window.close();

Message permanent page

— document.close is not a function btw afaik

— It is

— Oh, what does it do?

— It closes the input stream, so that the written changes are reflected in dom

— Also I had a similar problem with the data URI and I fixed via corsproxy