Plugins proof of concept

This commit is contained in:
Andrey Antukh 2024-02-02 09:17:10 +01:00
parent fd92437f7d
commit 3f473ca765
6 changed files with 200 additions and 10 deletions

View file

@ -0,0 +1,16 @@
export class PluginsElement extends HTMLElement {
connectedCallback() {
console.log('PluginsElement.connectedCallback');
}
}
customElements.define('penpot-plugins', PluginsElement);
// Alternative to message passing
export function initialize(api) {
console.log("PluginsRuntime:initialize", api)
api.addListener("foobar", "page", (page) => {
console.log("Page Changed:", page.name);
});
};