Skip to content

Scripting API / core/DisplayApi

core/DisplayApi

Modules

Module Description
External -

Classes

DisplayApi

Methods

addLoading()

addLoading(): Promise<void>

Prevents the user from interacting with the inspection by adding a loading screen.

Each call to this function requires a corresponding call to removeLoading. Calling this function mlutiple times will not create multiple loading screens.

Returns

Promise<void>

notify()

notify(options): Promise<void>

Displays a message to the user.

Parameters
Parameter Type Description
options DisplayNotifyOptions Options to customize the message that is displayed to the user.
Returns

Promise<void>

prompt()

prompt(title, message, buttons): Promise<string | number | boolean>

Displays a prompt where the user must click on of the provided buttons before proceeding.

Parameters
Parameter Type Description
title string The title of the message to show to the user.
message string The message to show to the user.
buttons PromptButton[] The buttons to show. The user will not be able to proceed if no buttons are provided.
Returns

Promise<string | number | boolean>

The return property of the button that was clicked.

removeLoading()

removeLoading(): Promise<void>

Removes the loading screen, if there is one. If addLoading has been called multiple times, the loading screen will not be removed until removeLoading has been called the same number of times.

Returns

Promise<void>