Re: Change to Attr interface in light of XPath

On 18/02/2014 21:02 , Justin Summerlin wrote:
> But by not fully inheriting from Node, we lose symmetry with other types
> of objects returned from XPath queries; we lose nodeType for example. If
> I get a result object and nodeType tells me nothing, I need to look at
> the prototype of the object or look at ownerElement, in this case, and
> see if that object is in the attribute list just to know what kind of
> object I'm working with.

Inheriting fully from Node is pretty heavy-handed, and for many things 
feels quite unnatural.

Do you have an implementation of XPath in JS? Maybe the simplest thing 
would be to show what information you need on Attr for it to work; it's 
likely to cover general-purpose requirements pretty well.

-- 
Robin Berjon - http://berjon.com/ - @robinberjon

Received on Wednesday, 19 February 2014 11:18:14 UTC