0.1.4 • Published 5 years ago

@maestro_io/panel-sdk v0.1.4

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

Maestro Panel SDK

Version: 1.00.0

Initializing

const MaestroPanelSDK = require('MaestroPanelSDK');
const panel = new MaestroPanelSDK();

const run = async () => {
  panel.init();
}

// get style from parent
panel.on('style', (style) => {
  // do stuff
  
});

// tell parent to render panel
panel.render();

// initialize the sdk
panel.init();

// destroy when finished
panel.destroy();

Methods

NameParamsDescriptionPayloadAsync
initregisters the iframe with the parent and inits listenerfalse
destroydestroys listeners and informs parent this iframe is destroyedfalse
renderinforms the parent the panel should be renderedfalse

Events

Name | Description style | fired when the parent's style changes | Payload matches IStyle.ts