开发者

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:

  1. printable version is generated
  2. browser navigates to this printable version
  3. browser content is printed
  4. 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 printComplete or something - so that I could trigger navigation when Javascript is no longer blocked? Maybe there are some other workarounds...?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜