lookupPrefix
Summary
Gets the namespace prefix associated with a URI, if any.
Syntax
var prefix = node.lookupPrefix(/* see parameter list */);
Parameters
namespaceURI
- Data-type
- String
The namespace URI.
Return Value
Returns an object of type StringString
The namespace prefix associated with the URI, or null if none is found.
Examples
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:svg="http://www.w3.org/2000/svg">
<script type="text/javascript"></script>
Related specifications
- DOM Level 3 Core
- Recommendation
Attributions
Mozilla Developer Network : [Node.lookupPrefix Article]
Microsoft Developer Network: [lookupPrefix Method Article]