BaseExtension class

The base class for all client-side extensions.

Extends

Remarks

The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the BaseExtension class.

Properties

context

Use the context object to access common services and state associated with the component.

properties

Extension properties is a JavaScript object that are passed in by the application that initializes the extension.

Methods

onInit()

This event method is called when the client-side extension is first activated on the page. virtual

Property Details

context

Use the context object to access common services and state associated with the component.

protected readonly context: ExtensionContext;

Property Value

Remarks

Child classes are expected to override this field by redeclaring it with a specialized type. It is meant to be a read-only property; the type cannot be declared as read-only in the base class (because it is initialized outside the constructor), but child classes should redeclare it as readonly.

properties

Extension properties is a JavaScript object that are passed in by the application that initializes the extension.

protected get properties(): TProperties;

Property Value

TProperties

Remarks

Properties can be used in the extension code to define configurable behaviors. The application has control over what properties to provide to an instance of the extension, however the most common way would be to have it stored on the server as JSON and pass it as is to the extension on initialization.

Method Details

onInit()

This event method is called when the client-side extension is first activated on the page. virtual

protected onInit(): Promise<void>;

Returns

Promise<void>