Hi, I'm writing Firefox add-on for Firefox 2.0.0.x and 3.0.0 (Beta 4). And I want to distinguish XMLHttpRequest from normal HttpRquest.
On Firefox 2.0.0.x, the following code works well. (I found this code at http://groups.google.co.jp/group/mozilla.dev.tech.network/browse_thread/thread/8ea4b3da543a1fc4/85e64a3766d6ef95) var isXMLRequest = false; try { // we must catch any errors here due to moz bug 317448 if (aSubject.notificationCallbacks && aSubject.notificationCallbacks instanceof XMLHttpRequest) { isXMLRequest = true; } } catch(ex) { logWarning("http-on-modify-request unable to check instance of nsIXMLHttpRequest [" + aSubject.URI.spec + "], ignoring..."); isXMLRequest = true; } But on Firefox 3 Beta 4, "aSubject.notificationCallbacks instanceof XMLHttpRequest" is false with XMLHttpRequest. So could anybody tell me how can I distinguish XMLHttpRequest from normal HttpRequest on Firefox 3 Beta 4. _______________________________________________ dev-tech-network mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-network
