MathMLElement: nonce property

فهرست فصل‌ها دانلود آرشیوناشر

MDN Web Docs · نسخهٔ df622a2a1c1e · CC BY-SA 2.5 و مجوز جداگانهٔ ناشر برای نمونه‌کد

{{APIRef("MathML")}}

The **nonce** property of the {{DOMxRef("MathMLElement")}} interface returns the {{Glossary("Nonce", "nonce")}} that is used by Content Security Policy to determine whether a given fetch will be allowed to proceed.

Value

A String; the cryptographic nonce, or an empty string if no nonce is set.

Examples

Retrieving a nonce value

js
const math = document.querySelector("math");
console.log(math.nonce);

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}

See also

  • {{domxref("HTMLElement.nonce")}} a similar property for HTML elements.
  • {{domxref("SVGElement.nonce")}} a similar property for SVG elements.
  • [nonce global attribute](/en-US/docs/Web/HTML/Reference/Global_attributes/nonce)
  • Content Security Policy
  • CSP: {{CSP("script-src")}}