On Thu, Nov 12, 2009 at 1:15 PM, John Resig <jere...@gmail.com> wrote: >> I think the one area that would be troublesome is in the properties >> that xhr provides (like readyState, responseXML, etc.). I'm not sure >> how you'd build this mock XHR and keep those properties up to date.
On Thu, Nov 12, 2009 at 10:14 PM, Julian Aubourg <aubourg.jul...@gmail.com> wrote: > As an example of what I'm talking about with an real xhr as a base: > - layer 0 is window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : > new XMLHttpRequest() > - layer 1 is a standard compliant xhr implementation that delegates to layer > 0 while hiding browser incompatibilities. It listens to layer 0 through its > onreadystatechange event handler and propagates the event by calling its own > onreadystatechange if available I had briefly mentioned a similar idea in the other thread [1], but was rather scared of the actual implementation. I guess the question is whether there are possible state changes to the underlying XHR object that might affect the properties but that are not exposed through the onreadystatechange handler. I don't have nearly the knowledge of XHR to answer this. If there aren't any, I think this is quite a good idea. -- Scott [1] http://tinyurl.com/yl2lqjz#msg_1fa4cac00dbcedcf -- You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to jquery-...@googlegroups.com. To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=.