| 127 | } |
| 128 | |
| 129 | class DefineScriptBlock extends HTMLElement { |
| 130 | constructor() { |
| 131 | super(); |
| 132 | |
| 133 | const name = this.getAttribute("name"), |
| 134 | body = this.innerHTML.slice(4, this.innerHTML.length - 3), |
| 135 | render = new Function("save", "html", "svg", body); |
| 136 | |
| 137 | defineElement(name, ({ save, html, svg, ...state }) => render.call(state, save, html, svg)); |
| 138 | } |
| 139 | } |
| 140 | |
| 141 | customElements.define("script-block", ScriptBlock); |
| 142 | customElements.define("define-script-block", DefineScriptBlock); |
nothing calls this directly
no outgoing calls
no test coverage detected