mirror of
https://github.com/penpot/penpot.git
synced 2025-08-04 04:08:37 +02:00
✨ Plugins proof of concept
This commit is contained in:
parent
fd92437f7d
commit
3f473ca765
6 changed files with 200 additions and 10 deletions
16
frontend/resources/public/js/plugins-runtime.mjs
Normal file
16
frontend/resources/public/js/plugins-runtime.mjs
Normal 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);
|
||||
});
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue