///
///
$SD.onConnected((jsn) => {
$SD.loadLocalization('../../../');
const form = document.querySelector('#property-inspector');
const { actionInfo, appInfo, connection, messageType, port, uuid } = jsn;
const { payload, context } = actionInfo;
const { settings } = payload;
Utils.setFormValue(settings, form);
form.addEventListener(
'input',
Utils.debounce(150, () => {
const value = Utils.getFormValue(form);
$SD.sendToPlugin(null, value);
$SD.setSettings(null, value);
})
);
});
/**
* Provide window level functions to use in the external window
* (this can be removed if the external window is not used)
*/
window.sendToInspector = (data) => {
console.log(data);
};
document.querySelector('#open-external').addEventListener('click', () => {
window.open('../../../external.html');
});