Contents

BrowserWindowOptions

Options for creating a new browser window.

Example 

import { app } from '@mobrowser/api';

const win = app.createWindow({
  size: { width: 800, height: 600 },
  url: 'https://example.com'
})
win.show()

Properties 

title 

readonly title?: string;

The title of the window.

size 

readonly size?: Size;

The window size.

position 

readonly position?: Point;

The window position.

alwaysOnTop 

readonly alwaysOnTop?: boolean;

Whether the window should be always on top.

windowTitleVisible 

readonly windowTitleVisible?: boolean;

Whether the window title is visible.

windowTitlebarVisible 

readonly windowTitlebarVisible?: boolean;

Whether the window titlebar is visible.

windowDisplayPolicy 

readonly windowDisplayPolicy?: WindowDisplayPolicy;

The display policy of the window accross multiple displays.

windowAnimationEnabled 

readonly windowAnimationEnabled?: boolean;

Whether the window animation is enabled.

activationIndependenceEnabled 

readonly activationIndependenceEnabled?: boolean;

Whether the user can interact with the always on top window without causing the application to be activated on macOS.

vibrancyEffect 

readonly vibrancyEffect?: VibrancyEffect;

The vibrancy effect of the window on macOS.

url 

readonly url?: string;

The URL to load when the window is created.

It can be a remote URL (e.g., “https://example.com”), an absolute path to a local file (e.g., “file:///path/to/file.html”), or the URL of the application frontend entry point you can access via app.url.

Example 

import { app } from '@mobrowser/api';

const win = app.createWindow({
  url: 'https://example.com'
})
win.show()