WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
210111
documentFragment.getElementById() should not work for empty-string IDs
https://bugs.webkit.org/show_bug.cgi?id=210111
Summary
documentFragment.getElementById() should not work for empty-string IDs
Domenic Denicola
Reported
2020-04-07 07:28:02 PDT
(This is tested using the bots on wpt.fyi; I do not have a Mac available in these working from home times.) URL:
http://wpt.live/dom/nodes/DocumentFragment-getElementById.html
Per spec, documentFragment.getElementById("") should return null, even if there is a <div id=""></div> inside the DocumentFragment. Safari passes the same test for document.getElementById(""):
http://wpt.live/dom/nodes/Document-getElementById.html
. Other browsers: Chrome fails, Firefox passes Spec reference:
https://dom.spec.whatwg.org/#concept-id
("value is null or the empty string").
Attachments
Patch
(6.18 KB, patch)
2020-04-07 10:28 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2020-04-07 10:28:44 PDT
Created
attachment 395702
[details]
Patch
Geoffrey Garen
Comment 2
2020-04-07 11:19:59 PDT
Comment on
attachment 395702
[details]
Patch r=me
EWS
Comment 3
2020-04-07 11:40:12 PDT
Committed
r259651
: <
https://trac.webkit.org/changeset/259651
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 395702
[details]
.
Radar WebKit Bug Importer
Comment 4
2020-04-07 11:41:19 PDT
<
rdar://problem/61402774
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug