Javascript Reference
Categories: Element

javascript Element scopeName, tagUrn

@March 15, 2008, 1:22 a.m.
scopeName, tagUrnFirefox/Netscape/NN n/a IE 5(Win) Chrome/Safari/DOM n/a  

Read-only  

For custom elements employing XML namespaces, the scopeName property returns the identifier that associates the tag name with a namespace that is defined elsewhere in the document via the xmlns attribute. All plain HTML elements return a value of HTML for this property. The tagUrn property returns the URI specified for the namespace. The corresponding properties in the W3C DOM are prefix and namespaceURI.

 
Example
 
var allTitles = document.getElementsByTagName("title");
		for (var i = 0; i < allTitles.length; i++) {
		    if (allTitles[i].scopeName == "libBook" &&
		        allTitles[i].tagUrn.indexOf("catalog.umv.edu") != -1) {
		        // process title elements from the desired namespace here
		    }
		}
 
Value

Strings.

 
Default

HTML for scopeName; empty string for tagUrn.


Powered by Linode.