Detect failure to load contents of an iframe

前端 未结 6 1789
迷失自我
迷失自我 2020-12-01 06:59

I can detect when the content of an iframe has loaded using the load event. Unfortunately, for my purposes, there are two problems with this:

  • If there
6条回答
  •  感情败类
    2020-12-01 07:37

    I think that the pageshow event is fired for error pages. Or if you're doing this from chrome, then your check your progress listener's request to see if it's an HTTP channel in which case you can retrieve the status code.

    As for page dependencies, I think you can only do this from chrome by adding a capturing onerror event listener, and even then it will only find errors in elements, not CSS backgrounds or other images.

提交回复
热议问题