RESOLVED CONFIGURATION CHANGED 4567
removed attributes yield null rather than empty string
https://bugs.webkit.org/show_bug.cgi?id=4567
Summary removed attributes yield null rather than empty string
Darin Adler
Reported 2005-08-21 17:17:40 PDT
The W3C DOM test named hc_elementremoveattribute is failing because we return a JavaScript null rather than an empty string. This behavior makes sense and matches Firefox. Perhaps the test needs to be revised.
Attachments
Darin Adler
Comment 1 2005-08-26 19:54:33 PDT
Curt, what do you think? Is this a mistake in the test?
Darin Adler
Comment 2 2005-08-26 19:54:40 PDT
Curt, what do you think? Is this a mistake in the test?
Curt Arnold
Comment 3 2005-08-26 20:32:56 PDT
This one is worth pushing up to the DOM IG. I haven't had time to do a full survey, but this seems to be one that the Java implementations pass and the ECMAScript implementations (IE, Mozilla and Safari) fail. The descriptions of getAttribute in DOM L1 Core and subsequent do not specify any conditions that getAttribute is allowed to return null and the conditions in the test satisify the criteria under which an empty string is specified as the return value. There would seem to be a reasonable case to support an errata allowing null as an acceptible return value and modify the test to accept either null or empty string.
Darin Adler
Comment 4 2005-12-10 17:44:53 PST
Some history. Originally we returned empty string in these cases. Then we had to change to be compatible with sites that assumed the behavior of Gecko (and presumably WinIE). So far the DOM committee does not seem sympathetic about the possibility of creating errata covering this.
Ian 'Hixie' Hickson
Comment 5 2008-01-06 17:22:28 PST
We should fix this in Web DOM Core.
Lucas Forschler
Comment 6 2019-02-06 09:03:01 PST
Mass moving XML DOM bugs to the "DOM" Component.
Ahmad Saleem
Comment 7 2022-08-02 04:26:21 PDT
From the test case URL - https://www.w3.org/2007/03/dom-tests/hc_elementremoveattribute.html I am getting following behavior across browsers: > Firefox Nightly 105: Test: http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementremoveattribute Status: failure Detail: attrValue: assertEquals failed, actual null, expected . > Chrome Canary 106: Test: http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementremoveattribute Status: failure Detail: attrValue: assertEquals failed, actual null, expected . > Safari 15.6 on macOS 12.5 Test: http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_elementremoveattribute Status: failure Detail: attrValue: assertEquals failed, actual null, expected . __________ Since all browsers are matching, we can mark this as 'RESOLVED CONFIGURATION CHANGED". Thanks!
Note You need to log in before you can comment on or make changes to this bug.