JsPDF - Not allowed to navigate top frame to data URL

后端 未结 14 2199
Happy的楠姐
Happy的楠姐 2020-11-27 02:53

After updating Google Chrome, the report jsPDF in a new Window does not work any more.

The console shows the message:

Not allowed to navigate

14条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-11-27 03:42

    This works well now that chrome has removed top frame navigation. Only downloading the pdf in chrome gives problem. Download works in well in firefox tho.

    var string = doc.output('datauristring');
    var iframe = ""
    var x = window.open();
    x.document.open();
    x.document.write(iframe);
    x.document.close();
    

提交回复
热议问题