You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<desc>The nonce attribute passed to the executed script.</desc>
18
+
</property>
19
+
</argument>
20
+
</signature>
10
21
<desc>Execute some JavaScript code globally.</desc>
11
22
<longdesc>
12
23
<p>This method behaves differently from using a normal JavaScript <code>eval()</code> in that it's executed within the global context (which is important for loading external scripts dynamically).</p>
@@ -15,7 +26,19 @@
15
26
<desc>Execute a script in the global context.</desc>
16
27
<code><![CDATA[
17
28
function test() {
18
-
jQuery.globalEval( "var newVar = true;" )
29
+
jQuery.globalEval( "var newVar = true;" );
30
+
}
31
+
test();
32
+
// newVar === true
33
+
]]></code>
34
+
</example>
35
+
<example>
36
+
<desc>Execute a script with a nonce value on a site with Content Security Policy enabled.</desc>
0 commit comments