Questions tagged «firefox-developer-tools»


1
如何识别谁在Firefox中发起了http请求?
我正在开发一个新的Firefox插件,该插件可以拦截所有Firefox的网络流量(带有的http(s)请求http-on-modify-request) 使用当前的代码,我可以将来自网页/标签页和所有其他组件(RSS提要更新,来自XPCOM组件的XHR请求,扩展,扩展管理器等)的请求分开。 我想确定是谁发起了除制表符流量以外的请求,而不仅仅是整个组?(RSS,XPCOM组件,扩展,扩展管理器等) 示例:假设的自定义变量requestRequestor将具有一个值,以标识特定的插件或RSS更新等。 我发现了类似的问题,但没有解决方案。 标识整个组的当前代码(获取触发http-on-modify-request通知的浏览器)是: Components.utils.import('resource://gre/modules/Services.jsm'); Services.obs.addObserver(httpObs, 'http-on-modify-request', false); //Services.obs.removeObserver(httpObs, 'http-on-modify-request'); //uncomment this line, or run this line when you want to remove the observer var httpObs = { observe: function (aSubject, aTopic, aData) { if (aTopic == 'http-on-modify-request') { /*start - do not edit here*/ var oHttp = …


By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.