[Vuejs]-How can I confirm if the page that i created using window.open window.document.write is loaded

0👍

I just changed the way with an iframe

     let myWindow = window.frames["printf"];


   let printScript =   '<script>if(typeof printCopies === "undefined"){ let printCopies = 0;}  printCopies = '+ app.printCopies + ';  function printDocument(){if(printCopies > 0){   for(let i= printCopies ; i>= 0; i--){  window.print(); } } else{ window.print();}} </script>';

    myWindow.document.write( printScript + '<body onload="printDocument()">'+receiptHtml '</body>'  );

Leave a comment