ApplicationAccessor class
Provides access to the client-side application that is currently running.
Remarks
The client-side application determines the user experience for an entire web page. (It is a client-side component with a manifest; however, the SharePoint Framework does not enable third parties to create their own client-side applications at this time.) Within a web page, at most one client-side application will be running at a time. Certain in-place navigation transitions can cause the application to be unloaded and replaced by a different application.
The ApplicationAccessor class enables extensibility components such as extensions and web parts to interact with the currently running application. It acts as a proxy for the real application object (the BaseApplication subclass), to ensure that extensibility components only rely on interactions that would be portable across all applications.
Constructors
| (constructor)(service |
Constructs a new instance of the ApplicationAccessor class. |
Events
| navigated |
An event that is fired when the application's top-level page context navigates to a new page. |
Constructor Details
(constructor)(serviceScope)
Constructs a new instance of the ApplicationAccessor class.
constructor(serviceScope: ServiceScope);
Parameters
- serviceScope
- ServiceScope
Remarks
Third parties should not call this constructor. Instead, use the ApplicationAccessor instance from the component context, for example BaseApplicationCustomizer.context<!--
Event Details
navigatedEvent
An event that is fired when the application's top-level page context navigates to a new page.
get navigatedEvent(): SPEvent<SPEventArgs>;
Event Type
Remarks
This event fires after the top-level PageContext has navigated to a new page.