Hi there,

2011/10/12 Křištof Želechovski <[email protected]>

> Dnia piątek, 7 października 2011 o 12:22:18 aslan napisał(a):
> > Sounds quite simple but when I try to do that it only works for xhr
> > fired from my chrome extension and not from website i am browsing:
> > for example i want to report xhr to console:
> > ------------------------------
>
> I am sorry, your code does not make any sense.
>

That code Aslan posted in a stripped down version of the code used in
Firebug Lite:

http://code.google.com/p/fbug/source/browse/lite/branches/firebug1.5/content/lite/xhr.js


>
> > var XMLHttpRequestWrapper = function(activeXObject){
>
> And the purpose of the parameter is?
>

This parameter is used to make the XMLHttpRequestWrapper compatible with
IE6. In this case, Firebug Lite also creates a wrapper for the global
ActiveXObject constructor. The activeXObject object is passed to the
XMLHttpRequestWrapper here:

http://code.google.com/p/fbug/source/browse/lite/branches/firebug1.5/content/lite/xhr.js#486


>
> >     console.log("xhr!!!!!!!!!!!");
> >     new XMLHttpRequest();
>
> You create a new request and immediately drop it
>

Yes. You need to use return new XMLHttpRequest() instead, otherwise it won't
work.

regards,

Pedro Simonetti.



>
> > }
>
> >
> > var _XMLHttpRequest = XMLHttpRequest;
> > window.XMLHttpRequest = function()
> >     {
> >         return new XMLHttpRequestWrapper();
>
> The value returned from the constructor is dropped, so this line is void
> too.
>
> >     };
> > -------------------------------
> > it only fires on my own xhrs not on those from website.
> >
> > Maybe You know why?
> > Great thanks for help. I really appreciate.
> >
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "Firebug" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/firebug?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Firebug" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/firebug?hl=en.

Reply via email to