getCurrentPageMetadata
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.
typestringThe type of page.
The only valid value is "absolute".
dimensionsPageDimensionsThe dimensions of the page, in pixels.
This may be undefined because some types of pages don't have dimensions, such as whiteboards.
widthnumberThe width of the page, in pixels.
heightnumberThe height of the page, in pixels.
titlestringThe name of the page.
This is optional and will be empty if the user hasn't set a title.
pageIdstringStable identifier for this page within the design.
Pages that do not have fixed or unbounded dimensions currently do not return metadata.
typestringThe type of page.
The only valid value is "unsupported".