[1] manakai DOM Extensions > Extensions to
existing interfaces > Extensions to the
Node interface
[31] The description for the 
ElementTypeDefinition and
AttributeDefinition interfaces
includes the interaction of existing attributes
and methods of Node interface
and these new node types.
[23] Two constants are added to the
definition group NodeType:
ELEMENT_TYPE_DEFINITION_NODE,
81001 in unsigned short,
represents that the Node
is an ElementTypeDefinition.ATTRIBUTE_DEFINITION_NODE,
81002 in unsigned short,
represents that the Node
is an AttributeDefinition.[9] The manakaiLocalName attribute
contains the real
 local name of the
Node.
The type of this attribute is DOMString.
This attribute is read-only.
The getter of this attribute MUST
return the same value as the localName
on the same Node,
except when the localName getter
is so defined that it must return the canonicalized
version of real
 local name, in that case
the real
 local name MUST be returned.
[5] The manakaiExpandedURI attribute
contans the expanded URI, i.e. the concatenation
of the namespace URI and the local name of the 
Node.
The type of this attribute is DOMString.
This attribute is read-only.
manakaiLocalName of the
Node is null,
then the getter MUST return null.namespaceURI
of the Node is null,
then the getter MUST return the
manakaiLocalName of the 
Node.namespaceURI
and then manakaiLocalName.[4] The 
manakaiParentElement attribute
contains the parent element of the Node,
if any.
The type of this attribute is Element.
This attribute is read-only.
parentNode of
the Node is null,
then the getter MUST return null.parentNode
of the Node is an Element,
then the getter MUST return that 
Element.manakaiParentElement
of the parentNode of the
Node.  It might be null.Attr?[3] The manakaiAppendText method
appends a string at the end of the Node.
partial interface Node { Node manakaiAppendText(DOMString s); void manakaiAppendContent((Node or DOMString) node); };
.= operator is to be overloaded
by this method.  However, since overloading that
operator by this method makes the Perl
implementation (at least Perl 5.8.1 and 5.8.7
on GNU/Linux system) unstable, that feature is
temporarily disabled.[81012] When invoked, the method MUST run the following steps with the argument s:
textContent attribute of the context object has no effect,
return the context object and abort these steps.textContent attribute would append a Text node
as the children of the context object, Text node,
replace data with node the Text node, offset length attribute value
of the Text node, count 0, and data s.Text node whose data
is s and insert the node into the context object before null.CharacterData interface,
replace data with node the context object, offset length attribute value
of the context object, count 0, and data s.textContent attribute value to the textContent
attribute value immediately followed by s.[81013] The manakaiAppendContent method MUST run the following steps:
template element, or the context object otherwise.appendChild method of the Node interface is invoked with the context object context and the argument node.manakaiAppendText method of the Node interface is invoked with the context object context and the argument node.[1] The manakaiReadOnly attribute
represents whether the Node
is read-only or not.
This is a boolean attribute.
This attribute is read-only.
The getter MUST return true
if the Node is read-only.
Otherwise, it MUST return false.
[2] The manakaiSetReadOnly method
is used to set the manakaiReadOnly
attribute.
This method has two parameters: newValue
and deep.
This method returns nothing.
newValue, type boolean, 
represents the new value of the manakaiReadOnly
attribute.
deep, type boolean.
represents whether the descendants' 
manakaiReadOnly attributes
should also be set or not.
When invoked, the method MUST set the
manakaiReadOnly attribute,
i.e. the read-only flag, of the Node
to newValue.
If the deep parameter is set to
true, then the method MUST
act as if the method is also invoked to
any of the following Nodes with same
newValue and deep
parameters:
Nodes contained in
childNodes of the NodeNodes contained in
attributes of the Node
(if it is an Element)Nodes contained in
elementTypes of the Node
(if it is a DocumentTypeDefinition)Nodes contained in
generalEntities of the 
Node
(if it is a DocumentTypeDefinition)Nodes contained in
notations of the Node
(if it is a DocumentTypeDefinition)Nodes contained in
attributeDefinitions of the 
Node
(if it is a ElementTypeDefinition)partial interface Node { attribute DOMString manakaiLanguage; attribute DOMString manakaiHTMLLanguage; };
[6]
The manakaiLanguage attribute
contans the language information of the Node,
if available.
The type of this attribute is DOMString.
This attribute is read-write.
This getter MUST act as if the following algorithm is performed:
Node is an
Element:Attr, in
the attributes list of
the Element,
whose namespaceURI is 
http://www.w3.org/XML/1998/namespace
and localName is 
lang, then the getter
returns the value
of the Attr.Attr, in
the attributes list of
the Element,
whose namespaceURI is 
null
and localName is 
xml:lang, then the getter
returns the value
of the Attr.Node has a 
non-null parentNode,
then the getter returns the 
manakaiLanguage of that 
Node.Node has a
non-null ownerDocument,
then the getter returns the 
manakaiLanguage of that 
Node.Node is a 
Document and any natural
language information is attached to the 
Document,
for example by Content-Language
HTTP header field, then the getter returns it.xml:lang
attributes as defined in XML 1.0 and 1.1 specifications,
then the getter MUST return an XML-compatible
string that is considered as equivalent to that information.mul MAY be used.Documents.The setter MUST act as if the following algorithm is performed:
Node is an
Element:Node has one or two
Attrs whose namespaceURI
is http://www.w3.org/XML/1998/namespace
and localName is lang
or whose namespaceURI is
null and localName is
xml:lang, then:Element is read-only,
then throw a NO_MODIFICATION_ALLOWED_ERR
exceoption and abort the algorithm.Attr
MUST be removed from the Element
as if removeAttributeNode is invoked
with appropriate parameter.Attr
whose namespaceURI
is http://www.w3.org/XML/1998/namespace
and localName is lang:Attr is read-only,
then throw a NO_MODIFICATION_ALLOWED_ERR
exceoption and abort the algorithm.value to 
s and set its specified
to true.Attr
whose namespaceURI
is null and localName is 
xml:lang:Attr is read-only,
then throw a NO_MODIFICATION_ALLOWED_ERR
exceoption and abort the algorithm.value to 
s and set its specified
to true.setAttributeNS
method on the Element with
parameters http://www.w3.org/XML/1998/namespace,
xml:lang, and s.Document.[81009] On getting, the manakaiHTMLLanguage attribute of the
Node object MUST return the language of the node HTML.
[81010] On setting, the attribute MUST run the following steps:
lang attribute in the XML namespace,
set its value to the new value and abort these steps.lang attribute in no namespace
to the new value and abort these steps.lang attribute in the XML namespace,
set its value to the new value and abort these steps.[32] Node objects MAY
implement the NSResolver interface
[SelectorsAPI].
partial interface Node {
  DOMString? manakaiGetChildNamespaceURI(DOMString? tagName);
};[81003] The manakaiGetChildNamespaceURI method MUST
run the following steps:
Node is an HTML document:Node is a MathML text integration point:mglyph or malignmark,
return the MathML namespace and abort these steps.Node is an annotation-xml element in the 
MathML namespace and tagName is svg, return the
SVG namespace and abort these steps.Node is an HTML integration point, jump to the step named HTML.namespaceURI of the Node is 
the SVG namespace or the MathML namespace, return the namespaceURI and
abort these steps.svg, return the SVG namespace and
abort these steps.math, return the MathML namespace and
abort these steps.U+003A COLON
character (:):U+003A COLON
character (:) character and any folloing characters from prefix.Node using prefix and abort these steps.
Please note that prefix could be the empty string, which is different from null.Node using null as prefix and abort these steps.RootNode#✎partial interface DocumentFragment {
  HTMLCollection getElementsByTagName(DOMString localName);
  HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName);
  HTMLCollection getElementsByClassName(DOMString classNames);
};[81007] Methods getElementsByTagName,
getElementsByTagNameNS, and
getElementsByClassName
of the DocumentFragment interface
MUST' behave in the same way as the methods with same names
on the Document interface, respectively.
localNamealways returns the original local name of the element, use of themanakaiLocalNameattribute is discouraged.