Re: [XMLHttpRequest] Comment on the example in Section 1

On Apr 17, 2008, at 10:41 AM, Boris Zbarsky wrote:
> Subbu Allamaraju wrote:
>> Have you tried?
>
> Yes.  Have you?  Here, just to help you out:
>

Yes, indeed. It works with the specific example you tried below (using  
XHTML), but not for generic XML, which is what the draft is using.

> test.xhtml:
>
> <html xmlns="http://www.w3.org/1999/xhtml" id="one"/>
>
> test.html:
>
> <script>
> var x = new XMLHttpRequest();
> x.open("GET", "test.xhtml", false);
> x.send("");
> alert(x.responseXML.getElementById('one'));
> </script>
>
> But since you're apparently not willing to test yourself (the amount  
> of time it takes to write the test is smaller than the amount of  
> time it takes to send all these mails), I'll just let you know that  
> Gecko 1.8, Gecko 1.9, Safari 3.1, and Opera 9.25 all hand back the  
> HTMLElement from that getElementById call.

That's something :)

Subbu

Received on Thursday, 17 April 2008 17:45:05 UTC