Javascript 使用Chakra(JsRT)引擎,如何使用JsRuntimeAttributeAllowScriptInterrupt?

Javascript 使用Chakra(JsRT)引擎,如何使用JsRuntimeAttributeAllowScriptInterrupt?,javascript,internet-explorer,Javascript,Internet Explorer,我使用JsRT脚本API接口与MSIE脚本引擎交互。 运行时有一个名为“JsRuntimeAttributeAllowScriptInterrupt”的标志。 如何设置回调或中止当前的javascript计算 我正在使用以下JsRT C#示例 标题:JavaScript运行时宿主示例 URL:自我回复。 运行时中有一个属性“Disable” 通过设置 runtime.Disable = true 它将在内部调用 JsIsRuntimeExecutionDisabled() 终止当前执行 运

我使用JsRT脚本API接口与MSIE脚本引擎交互。 运行时有一个名为“JsRuntimeAttributeAllowScriptInterrupt”的标志。 如何设置回调或中止当前的javascript计算

我正在使用以下JsRT C#示例

标题:JavaScript运行时宿主示例 URL:

自我回复。 运行时中有一个属性“Disable”

通过设置

runtime.Disable = true
它将在内部调用

JsIsRuntimeExecutionDisabled() 
终止当前执行

运行时将停止脚本执行

为使用此函数所需的运行时实例设置“JsRuntimeAttributeAllowScriptInterrupt”标志

正如我所预料的那样