getCurrentPageContext

API reference for the getCurrentPageContext method.

Allows to get the context of currently selected page.

Page context of currently selected page. This is a Promise that resolves with the following object:

#dimensionsPageDimensions | undefined

The dimensions of the page, in pixels.

This may be undefined because some types of pages don't have dimensions, such as whiteboards.

Properties of dimensions
#widthnumber

The width of the page, in pixels.

#heightnumber

The height of the page, in pixels.