How to get the page element initiating a GET request from inside a firefox extension xpcom component? -
i have firefox extension xpcom component listens http-on-modify-request , gets location of page making request:
getlocationoforiginatingwindow: function (httpchannel) { try { var notificationcallbacks; if (httpchannel.notificationcallbacks) { notificationcallbacks = httpchannel.notificationcallbacks; } else if (httpchannel.loadgroup && httpchannel.loadgroup.notificationcallbacks) { notificationcallbacks = httpchannel.loadgroup.notificationcallbacks; } else { return null; } return notificationcallbacks.getinterface(components.interfaces.nsidomwindow).top.location; } catch (e) { debug("exception getting window location: " + e + "\nchannel uri: " + httpchannel.uri.spec); return null; } },
i page element made request (img, script etc.). there way httpchannel?
there's no specific way tell made request http observer, since there many different ways of triggering requests, such css background image rollover. try attacking problem content policy end, believe gives more information.
Comments
Post a Comment