---
id: "M:cAlgo.API.WebView.StopAsync"
kind: "method"
type: "T:cAlgo.API.WebView"
url: "https://help.ctrader.com/ctrader-algo/references/Controls/WebView/StopAsync/"
---

> Documentation index for agents: https://help.ctrader.com/ctrader-algo/llms.txt · machine index: https://help.ctrader.com/ctrader-algo/api.json

# WebView.StopAsync

Member of [WebView](https://help.ctrader.com/ctrader-algo/references/Controls/WebView/index.md).

## StopAsync()

Stops asynchronously all navigations and pending resource fetches.

Environments: Desktop supported · CLI not supported · Cloud not supported.

- CLI: Accepted without error but never displayed, so control events such as Click are never raised.
- Cloud: Accepted without error but never displayed, so control events such as Click are never raised.

C#:

```csharp
public void StopAsync()
```

Python:

```python
webView.StopAsync() -> None
```

### Examples

C#:

```csharp
var webView = new WebView { Height = 300 };
webView.NavigateAsync("https://ctrader.com/");
var stopButton = new Button { Text = "Stop loading" };
stopButton.Click += args => webView.StopAsync();
var panel = new StackPanel();
panel.AddChild(stopButton);
panel.AddChild(webView);
Chart.AddControl(panel);
```

Python:

```python
webView = WebView()
webView.Height = 300
webView.NavigateAsync("https://ctrader.com/")
stopButton = Button()
stopButton.Text = "Stop loading"
stopButton.Click += lambda args: webView.StopAsync()
panel = StackPanel()
panel.AddChild(stopButton)
panel.AddChild(webView)
api.Chart.AddControl(panel)
```

