Open Bug 289583 Opened 20 years ago Updated 2 years ago

allow observing all refreshes?

Categories

(Core :: DOM: Navigation, enhancement)

enhancement

Tracking

()

People

(Reporter: Biesinger, Unassigned)

Details

timeless wants to observe all refreshes, as they are added as well as they are
followed.

I would suggest a function on some docshell interface:

  /**
   * Adds an observer that will get notified as new refreshes are added.
   * Only its refreshURI function will be called by this object. Exceptions from
   * the refreshURI functions will cause the refresh to be not followed.
   *
   * If the observer wants to get notified of refreshes as they are processed,
   * it should also implement nsIObserver, and will get notified with a topic
   * of "on-refresh-processed", and the subject will be the refresh target.
   *
   * Exceptions from the observe call will cause the refresh to not be followed.
   */
  void addRefreshObserver(in nsIRefreshURI aObserver);

  /**
   * Removes a previously registered observer.
   */
  void removeRefreshObserver(in nsIRefreshURI aObserver);

Opinions?
> and the subject will be the refresh target.

(i.e., an nsIURI)


it would be nice to also pass the docshell/nsIWebNavigation here somehow...
I don't really have thoughts on the subject (though I question the entire
existence of nsIRefreshURI).
fwiw my coworkers would rather an observerservice broadcast. i think as long as
parent nsIWBP get it, we'd be ok either way.
Assignee: adamlock → nobody
QA Contact: adamlock → docshell
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.