Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firefox add listener for browser error

i am using online addon builder to create a small addon. We can get page loading and url by using this : https://addons.mozilla.org/en-US/developers/docs/sdk/latest/dev-guide/tutorials/listen-for-page-load.html

I tested above and works.

But how to add listener for browser error messages like Problem loading page (when internet connection fails). i want to catch this error(for example alert "error loading page"). how is possible?

like image 309
Vpp Man Avatar asked Jan 18 '13 08:01

Vpp Man


1 Answers

  • "Intercepting Page Loads" lists several gizmos that let you watch HTTP traffic.
  • "Recognizing page load failure" has a very brief description of how you might approach this using WebProgressListeners. (It's linked from the above page, but the link is old and broken.)

It doesn't look like there's any Jetpack-specific functionality for this sort of thing, so you might be stuck with one of these far more verbose and low-level solutions. But I don't know what I'm talking about, so maybe post to mozilla.dev.extensions before you take my word for it. :) Good luck!

like image 151
Eevee Avatar answered Oct 18 '22 04:10

Eevee