Skip to main content

overwolf.windows.obtainDeclaredWindow

Overwolf APIs / overwolf / overwolf / windows / obtainDeclaredWindow

Call Signature​

function obtainDeclaredWindow(
windowName: string,
overrideSetting: WindowProperties,
callback: CallbackFunction<WindowResult>,
): void;

Creates or returns a window by the window name that was declared in the manifest.

Parameters​

ParameterTypeDescription
windowNamestringThe name of the window that was declared in the data.windows section in the manifest.
overrideSettingWindowPropertiesOverride manifest settings
callbackCallbackFunction<WindowResult>A callback function which will be called with the requested window as a parameter. See

Returns​

void

Call Signature​

function obtainDeclaredWindow(
windowName: string,
callback: CallbackFunction<WindowResult>,
): void;

Creates or returns a window by the window name that was declared in the manifest.

Parameters​

ParameterTypeDescription
windowNamestringThe name of the window that was declared in the data.windows section in the manifest.
callbackCallbackFunction<WindowResult>A callback function which will be called with the requested window as a parameter.

Returns​

void

Call Signature​

function obtainDeclaredWindow(
windowName: string,
useDefaultSizeAndLocation: DefaultSizeAndLocation,
callback: CallbackFunction<WindowResult>,
): void;

Creates an instance of your window (the window’s name has to be declared in the manifest.json) or returns a window by the window name.

Parameters​

ParameterTypeDescription
windowNamestringThe name of the window that was declared in the data.windows section in the manifest.
useDefaultSizeAndLocationDefaultSizeAndLocationEnable the manifest size and position settings (default is false).
callbackCallbackFunction<WindowResult>A callback function which will be called with the requested window as a parameter.

Returns​

void