diff --git a/BetterHTMLElement.js b/BetterHTMLElement.js index 9469631..b9aa516 100644 --- a/BetterHTMLElement.js +++ b/BetterHTMLElement.js @@ -1,4 +1,4 @@ -class BetterHTMLElement extends HTMLElement { +export class BetterHTMLElement extends HTMLElement { attributeChangedCallback(name, old, value) { this[name+"Changed"](value, old) } // Array of connected callbacks diff --git a/template.js b/template.js index ba6e577..1888ccc 100644 --- a/template.js +++ b/template.js @@ -1,4 +1,4 @@ -function setup(root) { +const setup = (root) => { root.parts = {} root.querySelectorAll("[part-id]").forEach( element => { root.parts[element.getAttribute("part-id")] = element @@ -7,7 +7,7 @@ function setup(root) { return root } -function template(strings, ...args) { +export const template = (strings, ...args) => { let buf = [] for (i=0;i