getAttribute() always non-null

Maksim Orlovich mo85 at cornell.edu
Sun Nov 20 20:44:06 GMT 2005


Mikolaj Machowski wrote:

<snip>
> 
> Last time I used it was 1.0 and everything worked, now it is in version
> 1.1 and one thing doesn't work: advance to next slide with left mouse
> button click.

Actually, more than that, there are at least 3 bugs I am aware of (CSS not
applying, mouse events over text nodes, and this one); they are all in my
worklist.

> 
> I tracked it down to:
> 
> target.getAttribute('href') != null
> 
> Looks like output from getAttribute() is always non-null breaking S5.

<snip> The reason KHTML does that is that the DOM specification requires
returning empty strings, not null. Unfortunately, the only other browser to
actually behave like that is Opera. And, as you saw, the web requires it,
for example current Yahoo Mail. At any rate, there is a patch for this at
#116413; I was going to try to commit it for 3.5.1, after discussion w/more
maintainer-type folks. But since you brought it up --- David, Harri -- what
do you think? This shows up on one of the official DOM testcases, and some
of our own (as well as mozilla's, where it's marked FAIL, but WONTFIX)

-Maks









More information about the kfm-devel mailing list