registerModel

@vulp/js-api > VulpApi > registerModel

VulpApi.registerModel() method

Connects an iframe containing a Vulp model.

Signature:

static registerModel(iframe: HTMLIFrameElement | null): Promise<VulpApiModel>;

Parameters

ParameterTypeDescription
iframeHTMLIFrameElement | nullThe iframe element containg the Vulp model.

Returns:

Promise<VulpApiModel>

A Vulp API model instance.

Example

const iframe = document.querySelector('iframe');
const model = VulpApi.registerModel(iframe);