Class: LiveController

LiveController

Live Experience controller. Entry point into the Live Experience web component.
The component exposes "controller" which is used to access all other public properties and methods. If using require.js the component can be given any module name, "liveApi" in this example. If not using require.js then the component must be accessed via the "liveApi" global property.
In the following example the component has been attached to the "oracle-live-experience-integration" element.
The service properties and the context attributes must be populated before the component is attached.
Events generated by the component will be received by an event listener attached to the element specified in the addComponent method.
See:
Example
liveApi.controller.addComponent();
document.querySelector("body")
  .addEventListener(liveApi.controller.events.LiveLoginSuccess,
  () => {
    console.log("login success");
  });

Members

contextAttributes :LiveContextAttributes

The context attributes map.
Type:

events :LiveEvents

The possible events emitted by the controller.
Type:

service :LiveService

The service properties.
Type:

settings :LiveSettings

The UI settings.
Type:

version :string

The API version information.
Type:
  • string

Methods

addComponent(actionopt)

Add the component to the page. Invoked after the web-component library has been loaded and the configuration has been set.
Parameters:
Name Type Attributes Description
action string <optional>
Not set (to addd component) or set to "remove" to shutdown call and remove component.

updateComponent()

Update the component on the page. Invoked after a change to the context attributes that may affect behaviours.