Re: IE Team's Proposal for Cross Site Requests

2008-05-10 Thread Henri Sivonen
XDR, JSONRequest and postMessage +iframe) would require me to add a new API design alongside the ones I already have and tailor it to the whims of the competing proposal. -- Henri Sivonen [EMAIL PROTECTED] http://hsivonen.iki.fi/

Re: [Element Traversal LC] access to element by index

2008-04-02 Thread Henri Sivonen
On Apr 2, 2008, at 16:50, Henri Sivonen wrote: if (next = current.firstChild) { current = next; continue; } break; Please disregard that break;. (Left-over from a switch that was obscuring the main point of the algorithm.) -- Henri Sivonen [EMAIL PROTECTED] http

Re: [Element Traversal LC] access to element by index

2008-04-02 Thread Henri Sivonen
On Apr 2, 2008, at 16:21, Henri Sivonen wrote: It was a problem for me when I tried to walk the HTML5 spec in Firefox 1.5 using iterative traversal with firstChild/nextSibling/ parentNode. Firefox 1.5 performed a *lot* worse than the then- current versions of Opera and Safari. And the spec

Re: [Element Traversal LC] access to element by index

2008-04-02 Thread Henri Sivonen
tive traversal with firstChild/nextSibling/parentNode. Firefox 1.5 performed a *lot* worse than the then-current versions of Opera and Safari. And the spec was a lot smaller back then, too. :-) -- Henri Sivonen [EMAIL PROTECTED] http://hsivonen.iki.fi/

Re: [Element Traversal LC] access to element by index

2008-04-02 Thread Henri Sivonen
On Apr 2, 2008, at 13:20, Jonas Sicking wrote: Henri Sivonen wrote: On Apr 2, 2008, at 12:44, Jonas Sicking wrote: And to what end? To use indexing instead of list-style iteration. Exactly. Something that I would imagine is quite commonly done. Note that we're not just talking iter

Re: [Element Traversal LC] access to element by index

2008-04-02 Thread Henri Sivonen
t commonly forward-iterated seems like an anti- pattern in terms of what implementation constraints are placed if the impression that the app developer gets is that indexing has the performance properties of array access and that it is OK to write app code with that assumption. -- Henri Sivo

Re: [Element Traversal LC] access to element by index

2008-04-02 Thread Henri Sivonen
he owner document or something along those lines. Again, not awfully hard, but still more complex than just adding convenience methods on an existing class. And to what end? To use indexing instead of list-style iteration. -- Henri Sivonen [EMAIL PROTECTED] http://hsivonen.iki.fi/

Re: [Element Traversal LC] access to element by index

2008-04-01 Thread Henri Sivonen
On Apr 2, 2008, at 00:45, Henri Sivonen wrote: Yes, getChildNodes() is available Doh. item() is available... -- Henri Sivonen [EMAIL PROTECTED] http://hsivonen.iki.fi/

Re: [Element Traversal LC] access to element by index

2008-04-01 Thread Henri Sivonen
se). Yes, getChildNodes() is available on an object implementing Element after casting it to NodeList or through reflections. There's no technical barrier to such casting--in the best case just docs saying that doing so is naughty reliance on an unguaranteed implementation detail and

Re: [Element Traversal LC] access to element by index

2008-04-01 Thread Henri Sivonen
On Apr 1, 2008, at 23:27, Boris Zbarsky wrote: Henri Sivonen wrote: The childNodes feature seems to have caused a lot of complexity in DOM implementations Really? What sort? I'm only familiar with the Gecko implementation here, but I don't see it causing extra complexity the

Re: [Element Traversal LC] access to element by index

2008-04-01 Thread Henri Sivonen
On Apr 1, 2008, at 18:41, Daniel Glazman wrote: Henri Sivonen wrote: How often do people pick a single child by index (with a number know a priori) instead of iterating over children and testing each one for an interesting trait? Let me turn the problem differently : NodeList and

Re: [Element Traversal LC] access to element by index

2008-04-01 Thread Henri Sivonen
On Apr 1, 2008, at 17:36, Henri Sivonen wrote: I think using var e = p.firstElementChild; while (e != null) { ... e = e.nextElementChild } to iterate over child elements is a cleaner idiom than introducing an index that isn't used for random access but only for forward iteration.

Re: [Element Traversal LC] access to element by index

2008-04-01 Thread Henri Sivonen
ccess but only for forward iteration. How often do people pick a single child by index (with a number know a priori) instead of iterating over children and testing each one for an interesting trait? -- Henri Sivonen [EMAIL PROTECTED] http://hsivonen.iki.fi/

Re: IE Team's Proposal for Cross Site Requests

2008-03-18 Thread Henri Sivonen
automatic serialization magic. [1] http://wiki.whatwg.org/wiki/Validator.nu_Web_Service_Interface -- Henri Sivonen [EMAIL PROTECTED] http://hsivonen.iki.fi/

Re: IE Team's Proposal for Cross Site Requests

2008-03-15 Thread Henri Sivonen
party site with credentials or a token which will be encoded in the URI or in the POST payload. The inability to pass credentials/ token in the HTTP headers will not stop communicating that data--it'll only be communicated in an inconvenient way. -- Henri Sivonen [EMAIL PROTECTED] http://hsivonen.iki.fi/

Re: XHR user agent "supports XML"?

2007-08-14 Thread Henri Sivonen
On Aug 14, 2007, at 04:39, Dan Connolly wrote: Every conforming user agent is a conforming _XML processor_. Nitpicking, but: Since the UA is larger than the XML processor, it would be more accurate to say that a conforming UA must use an XML processor to parse XML input. -- Henri