Calling insertBefore on Attributes
If the current node is an attribute, calling
insertBefore has the following results, depending on the value of the
|Node type passed in newChild||Result|
||Returns an error. These node types cannot be children of an attribute.|
||Inserts the children of the document fragment (
||Returns an error. These node types either cannot have children or their children are read-only.|
If an entity reference is added to an attribute, the namespace and the prefix of the entity reference are added to the element containing the attribute.