Skip to content

Latest commit

 

History

History
24 lines (16 loc) · 1.34 KB

iwebviewcontrol_longrunningscriptdetected.md

File metadata and controls

24 lines (16 loc) · 1.34 KB
-api-id -api-type
E:Windows.Web.UI.IWebViewControl.LongRunningScriptDetected
winrt event

Windows.Web.UI.IWebViewControl.LongRunningScriptDetected

-description

Occurs periodically while the IWebViewControl executes JavaScript, letting you halt the script.

-remarks

Your app might appear unresponsive while scripts are running. This event provides an opportunity to interrupt a long-running script. To determine how long the script has been running, check the ExecutionTime property of the WebViewLongRunningScriptDetectedEventArgs object. To halt the script, set the event args StopPageScriptExecution property to true. The halted script will not execute again unless it is reloaded during a subsequent IWebViewControl navigation.

Note

In some cases, the IWebVieControl cannot detect a long-running script. For example, this event might not occur if the script is stuck in a loop that doesn’t perform any memory allocations.

-see-also

-examples