Registering for progress callbacks << Previous |  Contents  |  Next >>  ]
Registering for progress callbacks This fragment registers your nsIWebProgressListener interface so you receive status/progress related callbacks.
  // include pertinent embedding interfaces
  #include "nsIWebProgressListener.h"
  ...
  rv = webBrowser->AddWebBrowserListener(
      NS_STATIC_CAST(nsIWebProgressListener*, this),
      NS_GET_IID(nsIWebProgressListener));
  if (NS_FAILED(rv)) return rv;