blob: 0bd42ab7cf754a1dd4cc0f692c23252b55db5adc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
---
title: Node.nodePrincipal
slug: Web/API/Node/nodePrincipal
translation_of: Web/API/Node
---
<div>
{{APIRef}}{{Fx_minversion_header(3)}}{{Non-standard_header}}
<p>The <code><strong>Node.nodePrincipal</strong></code> read-only property returns the {{Interface("nsIPrincipal")}} object representing current security context of the node.</p>
<p>{{Note("This property exists on all nodes (HTML, XUL, SVG, MathML, etc.), but only if the script trying to use it has chrome privileges.")}}</p>
<h2 id="Syntax" name="Syntax">Syntax</h2>
<pre class="syntaxbox"><i>principalObj</i> = element.nodePrincipal
</pre>
<h2 id="Notes" name="Notes">Notes</h2>
<p>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.</p>
<h2 id="Specification" name="Specification">Specification</h2>
<p>Not in any specification.</p>
</div>
<p> </p>
|