IWebPartContext interface

Warning

This API is now obsolete.

  • This interface will be removed in an upcoming release. Use the WebPartContext class instead.

The base context interface for client-side web parts.

Remarks

A "context" object is a collection of well-known services and other objects that are likely to be needed by any business logic working with a component. Each component type has its own specialized extension of this interface, e.g. IWebPartContext for web parts, IExtensionContext for client-side extensions, etc.

Properties

domElement

Reference to the DOM element that hosts this client-side component.

httpClient

HttpClient instance scoped to this web part.

instanceId

Web part instance id. This is a globally unique value.

manifest

Manifest for the client-side web part.

pageContext

SharePoint page context.

propertyPane

Accessor for common web part property pane operations.

spHttpClient

SPHttpClient instance scoped to this web part.

statusRenderer

Web part status renderer.

webPartTag

Web part tag to be used for logging and telemetry.

Property Details

domElement

Reference to the DOM element that hosts this client-side component.

readonly domElement: HTMLElement;

Property Value

HTMLElement

httpClient

HttpClient instance scoped to this web part.

readonly httpClient: HttpClient;

Property Value

instanceId

Web part instance id. This is a globally unique value.

readonly instanceId: string;

Property Value

string

manifest

Manifest for the client-side web part.

readonly manifest: IClientSideWebPartManifestInstance<any>;

Property Value

pageContext

SharePoint page context.

readonly pageContext: PageContext;

Property Value

propertyPane

Accessor for common web part property pane operations.

readonly propertyPane: IPropertyPaneAccessor;

Property Value

spHttpClient

SPHttpClient instance scoped to this web part.

readonly spHttpClient: SPHttpClient;

Property Value

statusRenderer

Web part status renderer.

readonly statusRenderer: IClientSideWebPartStatusRenderer;

Property Value

IClientSideWebPartStatusRenderer

webPartTag

Web part tag to be used for logging and telemetry.

readonly webPartTag: string;

Property Value

string