Class

Window

Window()

Class representing an iframe window from Contentstack UI. Not available for Custom Widgets.
Constructor

# new Window()

View Source window.ts, line 8

Members

any

# _connection

View Source window.ts, line 130

Methods

# disableAutoResizing() → {Window}

This method disables auto resizing of the extension height.

View Source window.ts, line 163

.
Window

# enableAutoResizing() → {Window}

This method enables auto resizing of the extension height.

View Source window.ts, line 157

.
Window

# enableResizing() → {external:Promise}

This method activates the resize button that gives you the provision to resize the window size of your Dashboard Widget.

View Source window.ts, line 136

A promise object which will resolve when a resize button is visible on the Dashboard Widget.
external:Promise

# onDashboardResize(callback) → {boolean}

This function executes the callback function whenever a Dashboard Widget extension is maximized or minimized. Only applicable on Dashboard Widget extensions.
Parameters:
Name Type Description
callback function Function to be called when a Dashboard Widget extension is maximized or minimized

View Source window.ts, line 143

Will return true
boolean

# updateHeight(height) → {external:Promise}

This method updates the extension height on Contentstack UI. If the ‘height’ argument is not passed, it will calculate the scroll height and set the height of extension window accordingly.
Parameters:
Name Type Description
height string | number Desired height of the iframe window

View Source window.ts, line 151

A promise object which will be resolved when Contentstack UI sends an acknowledgement stating that the height has been updated.
external:Promise