getAttribute() always non-null
David Faure
faure at kde.org
Tue Nov 22 16:47:36 GMT 2005
Note that DOM2 added hasAttribute(), probably to fix this ambiguity in DOM 1.
Instead of testing for null, the website should probably use hasAttribute() (where available).
On Sunday 20 November 2005 20:17, Mikolaj Machowski wrote:
> It probably returns empty string. It should return null for two reasons:
>
> 1. Looks like all other browsers are returning null.
> 2. Current behaviour doesn't allow for detection of cases like::
> <img alt="" />
I agree with both arguments, and I suggest that we return null too, unless anyone
knows of plans from IE or Mozilla to change this behavior in the near future.
--
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
More information about the kfm-devel
mailing list