You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 11, 2019. It is now read-only.
The DOM4 specification dated 19 November 2015 (see https://www.w3.org/TR/dom/), in section 4.8, lists interfaces for Element and Attr.
The Element interface defines the attribute "[SameObject] readonly attribute NamedNodeMap attributes;
". Notice that this is of type NamedNodeMap. The DOM4 has no definition of NamedNodeMap interface. Neither is there any indication in the text where it is defined. However, in the Element interface the reference to NamedNodeMap is linked to a DOM Level 3 Core.
DOM3 Level 3 Core details the NamedNodeMap interface. The text describes the NamedNodeMap interface as representing collections of Nodes, where Node is as defined in DOM Level 3 Core.
Now, let's return to DOM4. This time consider the Attr interface. Where is it used? The answer is nowhere. There are six instances in the specification where "Attr" appears. The last instance, in section 8.2, clearly shows that the Attr interface no longer inherits from Node.
Section 4.8 is not entirely clear as to whether the "attributes" part of the interface are instantiated using the "Attr" interface. While the descriptive text implies it, the interfaces rule it out.
All becomes clearer when referring to the WhatWG specification. Here, the NamedNodeMap interface is redefined in terms of the Attr interface.
Evidently the DOM4 specification has been passed as a recommendation when changes have only been partly applied. Thus, the DOM4 specification, as currently written, is sadly, unsuitable for normatively referencing in other specifications as it is effectively unimplementable. This situation needs urgent corrective action.
The text was updated successfully, but these errors were encountered:
In DOM3 NamedNodeMap is a collection of Nodes. In DOM4 Attr interface in no longer a Node dependant. Then NamedNodeMap can't be used to hold Attr objects, because it is incompatible.
The DOM4 specification dated 19 November 2015 (see https://www.w3.org/TR/dom/), in section 4.8, lists interfaces for Element and Attr.
The Element interface defines the attribute "[SameObject] readonly attribute NamedNodeMap attributes;
". Notice that this is of type NamedNodeMap. The DOM4 has no definition of NamedNodeMap interface. Neither is there any indication in the text where it is defined. However, in the Element interface the reference to NamedNodeMap is linked to a DOM Level 3 Core.
DOM3 Level 3 Core details the NamedNodeMap interface. The text describes the NamedNodeMap interface as representing collections of Nodes, where Node is as defined in DOM Level 3 Core.
Now, let's return to DOM4. This time consider the Attr interface. Where is it used? The answer is nowhere. There are six instances in the specification where "Attr" appears. The last instance, in section 8.2, clearly shows that the Attr interface no longer inherits from Node.
Section 4.8 is not entirely clear as to whether the "attributes" part of the interface are instantiated using the "Attr" interface. While the descriptive text implies it, the interfaces rule it out.
All becomes clearer when referring to the WhatWG specification. Here, the NamedNodeMap interface is redefined in terms of the Attr interface.
Evidently the DOM4 specification has been passed as a recommendation when changes have only been partly applied. Thus, the DOM4 specification, as currently written, is sadly, unsuitable for normatively referencing in other specifications as it is effectively unimplementable. This situation needs urgent corrective action.
The text was updated successfully, but these errors were encountered: