开发者

Finding the tab that fired an http-on-examine-response event

I'm using the nsIObserverService 开发者_如何学Cto monitor the responses, but it fires events for all tabs (browser in Mozilla terminology). I'd like to know which browser is getting the response in my observe method.


This sample code snippet from DevMo should do the trick. It allows you to find a browser (tab) given an nsICHannel from an HTTP request/response.

It specifically references the http-on-modify-request event, but aSubject should still be an nsIChannel for http-on-examine-response event events.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜