非标
此特征是非标准的,且不在标准轨道中。不要在面向 Web 的生产站点中使用它:它不适用于每个用户。实现之间可能存在大的不兼容性,且行为将来可能改变。
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.
Node.nodePrincipal
read-only property returns the
nsIPrincipal
object representing current security context of the node.
注意: This property exists on all nodes ( HTML , SVG , MathML , XUL , etc.), but only if the script trying to use it has chrome privileges .
principalObj = Node.nodePrincipal
An
nsIPrincipal
object representing the node's security context.
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.
Not in any specification. This is a Firefox-specific property.
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
nodePrincipal
非标
|
Chrome
? — 46
|
Edge ? | Firefox ? | IE ? | Opera ? | Safari ? |
WebView Android
? — 46
|
Chrome Android
? — 46
|
Firefox Android ? | Opera Android ? | Safari iOS ? |
Samsung Internet Android
? — 5.0
|
不支持
兼容性未知
实验。期望将来行为有所改变。
非标。预期跨浏览器支持较差。
见实现注意事项。
节点
AbortController
AbortSignal
AbstractRange
Attr
ByteString
CDATASection
CSSPrimitiveValue
CSSValue
CSSValueList
CharacterData
ChildNode
注释
CustomEvent
DOMConfiguration
DOMError
DOMErrorHandler
DOMException
DOMImplementation
DOMImplementationList
DOMImplementationRegistry
DOMImplementationSource
DOMLocator
DOMObject
DOMParser
DOMPoint
DOMPointInit
DOMPointReadOnly
DOMRect
DOMString
DOMTimeStamp
DOMTokenList
DOMUserData
Document
DocumentFragment
DocumentType
元素
ElementTraversal
Entity
EntityReference
事件
EventTarget
HTMLCollection
MutationObserver
NodeFilter
NodeIterator
NodeList
NonDocumentTypeChildNode
ProcessingInstruction
PromiseResolver
范围
StaticRange
文本
TextDecoder
TextEncoder
TimeRanges
TreeWalker
TypeInfo
USVString
UserDataHandler
XMLDocument