How to prevent Javascript print from blocking other scripts
I am writing a Firefox applica开发者_StackOverflow社区tion, where I substitute content of a <browser>
element for printing, i.e. when you click browser the following is done:
- printable version is generated
- browser navigates to this printable version
- browser content is printed
- browser navigates back to original page
The problem is that the original page has some important Javascript handling while it is loaded, but printing operation (and it may take quite a while) blocks Javascript.
As a result, what happens is that when page is loaded printing is in process, so page's Javascript is blocked => page is not complete.
Is there any way to prevent print method from blocking Javascript?
Or any way to catch event printComplet
e or something - so that I could trigger navigation when Javascript is no longer blocked?
Maybe there are some other workarounds...?
精彩评论