Hi,
[s]thank you in your advice.

>aSubject.notificationCallbacks instanceof
>Components.interfaces.nsIXMLHttpRequest) {

I check your code, but it returned false on Firefox 3 beta4.

I get interfaces of notificationCallback.
getInterfacesByObject(subject.notificationCallbacks, false)
=>
- nsIExpatSink
- nsIInterfaceRequestor
-nsIRequestObserver
-nsIStreamListener
-nsIChannelEventSink

How can I distinguish XMLHttpRequest from normal HttpRequest?


The source code of getInterfacesByObject is follwing.

function getInterfacesByObject(obj, excludeSupports) {
  if (!excludeSupports) {
    excludeSupports = true;
  }

  var ifaces = [];

  for (var iface in Ci) {
    if (obj instanceof Ci[iface]) {
      if (excludeSupports && iface == "nsISupports") {
        continue;
      }

      ifaces.push(Ci[iface]);
    }
  }

  return ifaces;
}

_______________________________________________
dev-tech-network mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-network

Reply via email to