W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2000

Re: hasAttribute and hasAttributeNS

From: <keshlam@us.ibm.com>
Date: Thu, 18 May 2000 17:23:46 -0400
To: kboone@ebt.com
cc: "DOM (E-mail)" <www-dom@w3.org>
Message-ID: <852568E3.0075883D.00@D51MTA03.pok.ibm.com>
Minor opportunity for memory-management optimization. Some DOMs (eg those
which run as proxy for other data representations) may not create actual
Attr objects until they're retrieved. hasAttribute tests for presence
without requiring that the object be instantiated.

Basically, it's a workaround for the fact that getAttribute can't
distinguish attribute-doesn't-exist from attribute-value-is-empty-string.

Not essential, but "mostly cheap and harmless".

______________________________________
Joe Kesselman  / IBM Research
Received on Thursday, 18 May 2000 17:24:07 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:47 GMT