|
Re: getElementById method on SVGSVGElement: msg#00033web.svg
Thomas DeWeese wrote: Well, it would seem to me that the restriction is that duplicate Do you have a reference for this? I couldn't find anything in the DOM allowing (or forbidding) such behaviour. Nodes that aren't attached to the hierarchy still belong to the document. I could well see an implementation that doesn't check to see if a node is attached or not before indexing IDs in a global ID table (in fact I know of at least one that does that). In fact, if I read DOM 3 Core correctly, the attachement of the node to the tree appears to be irrelevant. If you look at the spec, the isId field on Attr says "when it is [of type ID] and its value is unique, the ownerElement of this attribute can be retrieved using the method Document.getElementById"[0]. Based on that, I would expect that given element 'el' not attached to the tree but belonging to document 'doc' and having an attribute 'foo' of value 'bar', if I did el.setIdAttribute('foo', true) it appears to be expected that doc.getElementById('bar') would return el. [0]http://www.w3.org/TR/DOM-Level-3-Core/core.html#Attr-isId -- Robin Berjon Research Scientist Expway, http://expway.com/ |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | [SVG 1.1] Some issues in the definition of suspendRedraw/unsuspendRedraw/forceRedraw: 00033, Boris Zbarsky |
|---|---|
| Next by Date: | Re: getElementById method on SVGSVGElement: 00033, Cameron McCormack |
| Previous by Thread: | Re: getElementById method on SVGSVGElementi: 00033, Boris Zbarsky |
| Next by Thread: | Re: getElementById method on SVGSVGElement: 00033, Cameron McCormack |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |