Rank: Member Groups: Member
Joined: 8/5/2016 Posts: 17
|
Hi guys, we are struggling with printing on a website that fires the print event via JavaScript.
If JavaScript calls the window.print() function too often within a short period, the "BeforePrint" event stops to be fired. This mostly happens after the 6. attempt to print. At the same time you can see an error in the webview console with following error "Ignoring too frequent calls to print()".
I searched this error on Google and found out, that this was an known issue of Chrome engine that was officially fixed in 2012 (!!!).
I hope you can help us. Regards Lukas
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,225
|
Hi, This is neither is a bug nor has it been fixed. The behavior is by design and the code that blocks frequent print is still there. You can find the corresponding source code here: https://cs.chromium.org/chromium/src/components/printing/renderer/print_render_frame_helper.cc?q=print_render_frame_helper.cc&l=2419You can see the comment in the code to see the exact logic used to block frequent print from JavaScript. Thanks!
|