This repository was archived by the owner on Oct 23, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
sp webpart base.iwebpartcontext
John Nguyen edited this page Apr 22, 2021
·
2 revisions
Home > @microsoft/sp-webpart-base > IWebPartContext
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.
Signature:
interface IWebPartContextA "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.
| Property | Type | Description |
|---|---|---|
| domElement | HTMLElement | Reference to the DOM element that hosts this client-side component. |
| httpClient | HttpClient | HttpClient instance scoped to this web part. |
| instanceId | string | Web part instance id. This is a globally unique value. |
| manifest | IClientSideWebPartManifestInstance<any> | Manifest for the client-side web part. |
| pageContext | PageContext | SharePoint page context. |
| propertyPane | IPropertyPaneAccessor | Accessor for common web part property pane operations. |
| spHttpClient | SPHttpClient | SPHttpClient instance scoped to this web part. |
| statusRenderer | IClientSideWebPartStatusRenderer | Web part status renderer. |
| webPartTag | string | Web part tag to be used for logging and telemetry. |