title: Conditionally disable/enable strict mode in Javascript
body: <p>I need to disable "use strict" in safari due to readonly issues similar to here:</p>
  
  <p><a href="https://github.com/mgonto/restangular/issues/212" rel="nofollow">https://github.com/mgonto/restangular/issues/212</a></p>
  
  <p>I don't want to disable it for every browser though, and it seems that basic conditionals don't work with "use strict". </p>
  
  <p>For example, this doesn't work as expected in Chrome 35:</p>
  
  <pre><code>if (true) "use strict";
  function isStrict() { console.log(!this); }; 
  isStrict(); //false
  </code></pre>
  
  <p>This will work:</p>
  
  <pre><code>"use strict";
  function isStrict() { console.log(!this); }; 
  isStrict(); //true
  </code></pre>
  
  <p>However, ideally I would like to know why Safari is breaking in the first place...but it is seemingly random when it will throw a readonly error. Has anyone else experienced this?</p>