[Webkit-unassigned] [Bug 119465] New: htmlformcontrolscollection.namedItem(name) should be returned "Null", if there are no nodes in the collection.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sat Aug 3 01:21:38 PDT 2013
https://bugs.webkit.org/show_bug.cgi?id=119465
Summary: htmlformcontrolscollection.namedItem(name) should be
returned "Null", if there are no nodes in the
collection.
Product: WebKit
Version: 528+ (Nightly build)
Platform: Unspecified
OS/Version: Unspecified
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: HTML DOM
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: sh919.park at samsung.com
According to below Algorithm, htmlformcontrolscollection.namedItem(name),htmloptionscollection.namedItem(name), htmlallcollection.namedItem(name) and htmlformcontrolscollection(name) should be returned "Null", if there are no nodes in the collection. [1][2][3][4].
But undefined is returned in WebKit in this case.
-------------------------------------------------------------------------
The namedItem(name) method must act according to the following algorithm:
If, at the time the method is called, there is exactly one node in the collection that has either an id attribute or a name attribute equal to name, then return that node and stop the algorithm.
Otherwise, if there are no nodes in the collection that have either an id attribute or a name attribute equal to name, then return null and stop the algorithm.
Otherwise, create a new RadioNodeList object representing a live view of the HTMLFormControlsCollection object, further filtered so that the only nodes in the RadioNodeList object are those that have either an id attribute or a name attribute equal to name. The nodes in the RadioNodeList object must be sorted in tree order.
Return that RadioNodeList object.
-------------------------------------------------------------------------
[1] http://www.w3.org/TR/html5/infrastructure.html#dom-htmlformcontrolscollection-nameditem
[2] http://www.w3.org/TR/html5/infrastructure.html#dom-htmloptionscollection-nameditem
[3] http://www.w3.org/TR/html5/infrastructure.html#dom-htmlallcollection-nameditem
[4] http://www.w3.org/TR/html5/infrastructure.html#dom-htmlformcontrolscollection-nameditem
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list