getCurrentPageMetadata

API reference for the getCurrentPageMetadata method.

This API is a preview. Preview APIs are unstable and may change without warning. You can't release public apps using this API until it's stable.

Retrieves metadata for the page the user is currently on in the design.

Returns

Information about a page within a design. This is a Promise that resolves with the following object:

Information about a page within a design with fixed or unbounded dimensions.

typestring

The type of page.

The only valid value is "absolute".

dimensionsPageDimensions
Optional

The dimensions of the page, in pixels.

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

widthnumber

The width of the page, in pixels.

heightnumber

The height of the page, in pixels.

titlestring
Optional

The name of the page.

This is optional and will be empty if the user hasn't set a title.

pageIdstring
Optional

Stable identifier for this page within the design.

Pages that do not have fixed or unbounded dimensions currently do not return metadata.

typestring

The type of page.

The only valid value is "unsupported".