The `Electron.WebContents` API provides control over web page content within Electron windows. It handles page loading, navigation, JavaScript execution, and web page lifecycle events.
## Properties
#### 📋 `int Id`
Gets the unique identifier for this web contents.
#### 📋 `Session Session`
Manage browser sessions, cookies, cache, proxy settings, etc.
In the browser window some HTML APIs like `requestFullScreen` can only be invoked by a gesture from the user. Setting `userGesture` to `true` will remove this limitation.
Code execution will be suspended until web page stop loading.
**Parameters:**
-`code` - The code to execute
-`userGesture` - if set to `true` simulate a user gesture
-`isBrowserWindow` - Whether the webContents belong to a BrowserWindow or not (the other option is a BrowserView)
-`path` - Absolute path to the CSS file location
#### 🧊 `Task LoadURLAsync(string url)`
Loads the url in the window. The url must contain the protocol prefix.
The async method will resolve when the page has finished loading, and rejects if the page fails to load.
A noop rejection handler is already attached, which avoids unhandled rejection errors.
Loads the `url` in the window. The `url` must contain the protocol prefix, e.g. the `http://` or `file://`. If the load should bypass http cache then use the `pragma` header to achieve it.
The async method will resolve when the page has finished loading, and rejects if the page fails to load.
A noop rejection handler is already attached, which avoids unhandled rejection errors.
Loads the `url` in the window. The `url` must contain the protocol prefix, e.g. the `http://` or `file://`. If the load should bypass http cache then use the `pragma` header to achieve it.
Prints window's web page as PDF with Chromium's preview printing custom settings.The landscape will be ignored if @page CSS at-rule is used in the web page. By default, an empty options will be regarded as: Use page-break-before: always; CSS style to force to print to a new page.
**Parameters:**
-`path` - Output file path
-`options` - PDF generation options
**Returns:**
Whether the PDF generation succeeded.
## Events
#### ⚡ `InputEvent`
Emitted when an input event is sent to the WebContents.
#### ⚡ `OnCrashed`
Emitted when the renderer process crashes or is killed.
#### ⚡ `OnDidFailLoad`
Emitted when the load failed.
#### ⚡ `OnDidFinishLoad`
Emitted when the navigation is done, i.e. the spinner of the tab has stopped spinning, and the onload event was dispatched.
#### ⚡ `OnDidNavigate`
Emitted when a main frame navigation is done.
#### ⚡ `OnDidRedirectNavigation`
Emitted after a server side redirect occurs during navigation.
#### ⚡ `OnDidStartNavigation`
Emitted when any frame (including main) starts navigating.
#### ⚡ `OnDomReady`
Emitted when the document in the top-level frame is loaded.
#### ⚡ `OnWillRedirect`
Emitted when a server side redirect occurs during navigation.
## Usage Examples
### Page Loading
```csharp
// Load URL with options
await webContents.LoadURLAsync("https://example.com", new LoadURLOptions