Defer scriptEval test until first use to prevent Content Security Policy inline-script violations from occuring. Fixes #7371.

This commit is contained in:
Brandon Sterne 2011-01-17 16:31:12 -05:00 committed by jeresig
parent f01ef93aab
commit 220a0ce162
2 changed files with 32 additions and 22 deletions

View file

@ -583,7 +583,7 @@ jQuery.extend({
script.type = "text/javascript";
if ( jQuery.support.scriptEval ) {
if ( jQuery.support.scriptEval() ) {
script.appendChild( document.createTextNode( data ) );
} else {
script.text = data;