diff options
author | Marco Munizaga <marco.munizaga@ufl.edu> | 2013-09-03 14:15:21 -0400 |
---|---|---|
committer | Marco Munizaga <marco.munizaga@ufl.edu> | 2013-10-26 19:19:57 -0400 |
commit | da6f8dfc0fad1b0b6c5d88325223893e50db3aa5 (patch) | |
tree | 1394c206091b7721e02d3c47a2b01924602be3f1 /core/ccmArrayBuffer.js | |
parent | 89ddc9b208547dda83f8863ae8d69f1e8fd962cc (diff) | |
download | sjcl-da6f8dfc0fad1b0b6c5d88325223893e50db3aa5.zip sjcl-da6f8dfc0fad1b0b6c5d88325223893e50db3aa5.tar.gz sjcl-da6f8dfc0fad1b0b6c5d88325223893e50db3aa5.tar.bz2 |
Removed eval
Diffstat (limited to 'core/ccmArrayBuffer.js')
-rw-r--r-- | core/ccmArrayBuffer.js | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/core/ccmArrayBuffer.js b/core/ccmArrayBuffer.js index 152255e..04a6bbf 100644 --- a/core/ccmArrayBuffer.js +++ b/core/ccmArrayBuffer.js @@ -9,16 +9,14 @@ sjcl.arrayBuffer = sjcl.arrayBuffer || {} //patch arraybuffers if they don't exist if (typeof(ArrayBuffer) === 'undefined') { - //I honestly didn't want to use an eval but here is the problem - // - //If I do var ArrayBuffer = function(){} - //Then ArrayBuffer will be set to undefined because some js implementations set all vars to undefined at the beginning - // - //If I do ArrayBuffer = function(){} - //That breaks in strict mode because I'm declaring a variable w/o var - eval("ArrayBuffer = function(){}; DataView = function(){}") + (function(globals){ + "use strict"; + globals.ArrayBuffer = function(){}; + globals.DataView = function(){}; + }(this)); } + sjcl.arrayBuffer.ccm = { mode: "ccm", |