Non-standard
This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.

Obsolete since Gecko 46 (Firefox 46 / Thunderbird 46 / SeaMonkey 2.43)
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.

The Node.nodePrincipal read-only property returns the nsIPrincipal object representing current security context of the node.

Note: This property exists on all nodes (HTML, SVG, MathML, XUL, etc.), but only if the script trying to use it has chrome privileges.

Syntax

principalObj = Node.nodePrincipal

Value

An nsIPrincipal object representing the node's security context.

Notes

This property is read-only; attempting to write to it will throw an exception. In addition, this property may only be accessed from privileged code.

Specifications

Not in any specification. This is a Firefox-specific property.

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidiOS SafariSamsung Internet
Basic support
ExperimentalNon-standard
Chrome No support ? — 46
Notes
No support ? — 46
Notes
Notes This API was moved to the Element and Attr APIs according to the DOM4 standard.
Edge ? Firefox ? IE ? Opera ? Safari ? WebView Android No support ? — 46
Notes
No support ? — 46
Notes
Notes This API was moved to the Element and Attr APIs according to the DOM4 standard.
Chrome Android No support ? — 46
Notes
No support ? — 46
Notes
Notes This API was moved to the Element and Attr APIs according to the DOM4 standard.
Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android Full support Yes

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown
Experimental. Expect behavior to change in the future.
Experimental. Expect behavior to change in the future.
Non-standard. Expect poor cross-browser support.
Non-standard. Expect poor cross-browser support.
See implementation notes.
See implementation notes.

Document Tags and Contributors

Last updated by: ExE-Boss,