UNPKG

@microsoft/sp-webpart-base

Version:

SharePoint Framework support for building web parts

39 lines 1.42 kB
import type { IReadonlyTheme } from '@microsoft/sp-component-base'; import type { DisplayMode } from '@microsoft/sp-core-library'; import type IWebPartData from '../IWebPartData'; /** * Important properties for managing an iframed web part. */ export interface IIframedWebPartMetadata { /** * The origin of the url on the iframe. This property should be used when listening for * window messages from an iframe. * Ex: The origin of https://prepspo-app.spgrid.com/_layouts/15/webpart.aspx * is https://prepspo-app.spgrid.com */ origin: string; /** * The entire href source url on the iframe. This property should be used as the 'targetOrigin' * when sending window messages to iframe elements. */ url: string; /** * The web part data of the web part loaded in the iframe. */ webPartData: IWebPartData; /** * The Id of the iframe HTML element that contains the rendered web part. */ webPartElementId: string; /** * The current display mode of the web part. */ displayMode: DisplayMode; /** * Flag indicating whether the web part is rendered from the persisted data or not. If the web part is added * from toolbox, the value of this flag will be false. */ addedFromPersistedData: boolean; theme: IReadonlyTheme | undefined; } //# sourceMappingURL=IIframedWebPartMetadata.d.ts.map