External module: "index"
API used to integrate as solution web application with the unified shell of the Adobe Experience Cloud.
Index
Interfaces
Functions
Functions
init
▸ init(bootstrap
: function): void
Initializes a solution web application by invoking the bootstrap callback once the runtime is ready.
- if the module is already defined, start to bootstrap
- otherwise define the global callback that will be called when runtime is ready.
Example:
Copied to your clipboardimport React from 'react';import ReactDOM from 'react-dom';import runtime, {init} from '@exc/runtime';init(() => {ReactDOM.render(<MainComponent runtime={runtime()} />, document.querySelector('#main'));});
Parameters:
▪ bootstrap: function
Callback used to bootstrap a solution. The runtime object is passed in as a parameter to this callback.
▸ (runtime
: Runtime): void
Parameters:
Name | Type |
---|---|
runtime |
Returns: void
runtime
▸ runtime(): Runtime
Get the runtime object which contains all unified-shell APIs.
Example:
Copied to your clipboardimport React from 'react';import ReactDOM from 'react-dom';import excApp from '@exc/runtime';export class MyComponent extends React.Component {constructor(props) {this.runtime = excApp();}}
Returns: Runtime
The runtime object.