IWebPartContext interface
Warning
This API is now deprecated.
- 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
dom |
Reference to the DOM element that hosts this client-side component. |
http |
HttpClient instance scoped to this web part. |
instance |
Web part instance id. This is a globally unique value. |
manifest | Manifest for the client-side web part. |
page |
SharePoint page context. |
property |
Accessor for common web part property pane operations. |
sp |
SPHttpClient instance scoped to this web part. |
status |
Web part status renderer. |
web |
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
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
webPartTag
Web part tag to be used for logging and telemetry.
readonly webPartTag: string;
Property Value
string