Do more on the web, with a fast and secure browser!

Download Opera browser with:

  • built-in ad blocker
  • battery saver
  • free VPN
Download Opera

JS Printwin stuck page(current tab) after close in Opera(but Chrome not stuck)

  • This very simple JS code for print get stuck Opera page, for unstuck need switch tab.
    For Example Chrome or other Chromium based browser work fine with it.

    function print_check(){
    print_check = document.getElementById('print_check').innerHTML;
    printwin = open('', 'printwin', 'width=800,height=400');
    printwin.document.open();
    printwin.document.writeln('<html><head><title></title></head><body
    onload=print();close()>');
    printwin.document.writeln(print_check);
    printwin.document.writeln('</body></html>');
    printwin.document.close();
    }
    window.onload = function() {
    var print_btn = document.getElementById('print_btn');
    print_btn.onclick = print_check;
    }

    Fix it pls!

  • Please read this.

Locked