aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/conflicting/web/api/node_378aed5ed6869e50853edbc988cf9556/index.html
blob: 03f557b34718bfb02df0bc1360f8a2b0e9931b69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
---
title: Node.nodePrincipal
slug: conflicting/Web/API/Node_378aed5ed6869e50853edbc988cf9556
translation_of: Web/API/Node
translation_of_original: Web/API/Node/nodePrincipal
original_slug: Web/API/Node/nodePrincipal
---
<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>