Permalink
Browse files

Fix issue 1513: YUI violates Content-Security-Policy

  • Loading branch information...
1 parent 9661fd2 commit b70702f844293a1caccf81335af9f2c676d11ccb Gerard K. Cohen committed Dec 21, 2013
Showing with 6 additions and 3 deletions.
  1. +6 −3 src/yui/js/yui.js
View
@@ -199,7 +199,7 @@ available.
YUI.Env.DOMReady = true;
if (hasWin) {
remove(doc, 'DOMContentLoaded', handleReady);
- }
+ }
},
handleLoad = function() {
YUI.Env.windowLoaded = true;
@@ -431,7 +431,10 @@ proto = {
// use CDN default
return path;
- }
+ },
+ getGlobal: (function () {
+ return this;
+ }())
};
@@ -476,7 +479,7 @@ proto = {
useBrowserConsole: true,
useNativeES5: true,
win: win,
- global: Function('return this')()
+ global: Y.Env.getGlobal
};
//Register the CSS stamp element

0 comments on commit b70702f

Please sign in to comment.