Refactor of the plugins context

This commit is contained in:
alonso.torres 2024-04-02 09:58:21 +02:00 committed by Andrey Antukh
parent 5a34c25926
commit 127b481c38
12 changed files with 285 additions and 186 deletions

View file

@ -1,16 +0,0 @@
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);
});
};