title: Is there any way stopping or pausing the execution of Javascript in a JSContext object?
body: <p>I'm developing an iOS 7 app that has scripting capabilities using JavascriptCore.</p>
  
  <p>I'd like to have a way to pause or completely stop the code currently running on the JSContext. JavascriptCore isn't really well documented so I couldn't find an answer. </p>
  
  <p>I have a few ideas:</p>
  
  <ul>
  <li>Remove from the context the bridge object used to interact with my app and just let any code still running fail.</li>
  <li>Getting the JSGlobalContextRef for my JSContext and releasing it using JSGlobalContextRelease and recreating a JSContext to use.</li>
  </ul>
  
  <p>but hopefully there are better ways.</p>
  
  <p>Any help would be appreciated. Thanks!</p>