File

src/api.ts

Description

Implements the connection between the devtools and a theme implementation.

Index

Properties
Methods

Methods

get
get(path: string)

Should perform a GET request to the provided path.

Parameters :
Name Type Optional
path string No
Returns : Promise<literal type>
getElementInfo
getElementInfo(domElement: Element)

For the element selection mechanism to work, the devtools needs to know which Blueriq element is represented by a given DOM node.

Note: this should only match for DOM nodes that actually host a Blueriq element. Ancestor DOM nodes that are nested within a Blueriq component's view should return null; devtools internally traverses the ancestors to find the nearest DOM node that represents a Blueriq element.

Parameters :
Name Type Optional
domElement Element No
Returns : ElementInfo | null
locateElement
locateElement(element: literal type)

The opposite to getElementInfo, where the DOM node for a Blueriq element should be returned to allow highlighting of the currently selected Blueriq element in the devtools UI.

Parameters :
Name Type Optional
element literal type No
Returns : Element | null

Properties

devtoolsUrl
devtoolsUrl: string
Type : string

The URL where the devtools frontend is hosted.

runtimeUrl
runtimeUrl: string
Type : string

The URL where the Runtime is hosted.

targetOrigin
targetOrigin: string
Type : string

The communication between devtools and the theme happens through Window.postMessage https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage and this option exposes the targetOrigin configuration that is used in the communication. This can be configured as '*' to allow any origin.

results matching ""

    No results matching ""