Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions files/en-us/web/api/mathmlelement/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ _Also inherits properties from its parent, {{DOMxRef("Element")}}_.
- : Whether the control should be focused when the page loads, or when a {{htmlelement("dialog")}} or [popover](/en-US/docs/Web/HTML/Reference/Global_attributes/popover) become shown.
- {{DOMxRef("MathMLElement.dataset")}} {{ReadOnlyInline}}
- : A {{DOMxRef("DOMStringMap")}} object which provides a list of key/value pairs of named data attributes which correspond to [custom data attributes](/en-US/docs/Web/HTML/How_to/Use_data_attributes) attached to the element. These correspond to MathML's [`data-*`](/en-US/docs/Web/MathML/Reference/Global_attributes/data-*) global attributes.
- {{DOMxRef("MathMLElement.nonce")}}
- : Returns the cryptographic number used once that is used by Content Security Policy to determine whether a given fetch will be allowed to proceed.
- {{DOMxRef("MathMLElement.style")}}
- : A {{DOMxRef("CSSStyleDeclaration")}} representing the declarations of the element's `style` attribute.
- {{DOMxRef("MathMLElement.tabIndex")}}
Expand Down
40 changes: 40 additions & 0 deletions files/en-us/web/api/mathmlelement/nonce/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
title: "MathMLElement: nonce property"
short-title: nonce
slug: Web/API/MathMLElement/nonce
page-type: web-api-instance-property
browser-compat: api.MathMLElement.nonce
---

{{APIRef("MathML")}}

The **`nonce`** property of the {{DOMxRef("MathMLElement")}} interface returns the {{Glossary("Nonce", "nonce")}} that is used by [Content Security Policy](/en-US/docs/Web/HTTP/Guides/CSP) 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.

Comment thread
estelle marked this conversation as resolved.
## 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)
Comment thread
estelle marked this conversation as resolved.
- [Content Security Policy](/en-US/docs/Web/HTTP/Guides/CSP)
- CSP: {{CSP("script-src")}}