This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.
Node.prefix read-only property returns the namespace prefix of the specified node, or
null if no prefix is specified.
string = node.prefix
The following logs "x" to the console.
This will only work when a namespace-aware parser is used, i.e. when a document is served with an XML MIME type. This will not work for HTML documents.
|Document Object Model (DOM) Level 3 Core Specification
The definition of 'Node.prefix' in that specification.
|Obsolete||Specifies the behavior when it's set to
|Document Object Model (DOM) Level 2 Core Specification
The definition of 'Initial definition' in that specification.
|Feature||Android webview||Chrome for Android||Edge mobile||Firefox for Android||Opera Android||iOS Safari||Samsung Internet|
1. This API was moved to the
Attr APIs according to the DOM4 standard.
2. this property was read-write; starting with Firefox 5.0 it is read-only, following the specification.
3. Only supported on