BrowserView
Extends: AbstractView
A native view that displays an independent browser instance.
Example
import { BaseWindow, BrowserView } from '@mobrowser/api';
const win = new BaseWindow({
title: 'Reference',
size: { width: 800, height: 600 }
})
const view = new BrowserView({
url: 'https://example.com'
})
win.contentView.addChildView(view)
win.show()
Properties
browser
readonly browser: Browser;
The browser instance associated with this view.
Methods
constructor()
constructor(options?: BrowserViewOptions): void;
Creates a new browser view with the given options.
| Parameter | Type | Description |
|---|---|---|
options? | BrowserViewOptions | The options to use for creating the new browser view. If not provided, default options will be used. |