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

Parameter

Type

Description

iframe

HTMLIFrameElement | null

The 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);