registerModel
On this page
@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. |
Promise<VulpApiModel>
A Vulp API model instance.
Example
const iframe = document.querySelector('iframe');
const model = VulpApi.registerModel(iframe);