---
id: "M:cAlgo.API.WebView.#ctor"
kind: "constructor"
type: "T:cAlgo.API.WebView"
url: "https://help.ctrader.com/ctrader-algo/references/Controls/WebView/Constructor/"
---

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

# WebView constructor

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

## WebView()

Initializes a new instance of the WebView class.

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 WebView()
```

Python:

```python
WebView()
```

### Examples

C#:

```csharp
var webView = new WebView { Width = 400, Height = 300 };
webView.Loaded += args => webView.NavigateAsync("https://ctrader.com/");
Chart.AddControl(webView);
```

Python:

```python
webView = WebView()
webView.Width = 400
webView.Height = 300
webView.Loaded += lambda args: webView.NavigateAsync("https://ctrader.com/")
api.Chart.AddControl(webView)
```

