MCPcopy Create free account
hub / github.com/adobe/react-spectrum / getWebpackNonce

Function getWebpackNonce

packages/react-aria/src/utils/getNonce.ts:20–23  ·  view source on GitHub ↗
(doc?: Document)

Source from the content-addressed store, hash-verified

18 };
19
20function getWebpackNonce(doc?: Document): string | undefined {
21 let ownerWindow = doc?.defaultView as NonceWindow | null | undefined;
22 return ownerWindow?.__webpack_nonce__ || globalThis['__webpack_nonce__'] || undefined;
23}
24
25let nonceCache = new WeakMap<Document, string>();
26

Callers 1

getNonceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected