Package Exports
- fritz
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (fritz) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
fritz
A library for rendering custom elements in a web worker.
worker.js
import { Component, html } from 'fritz';
class Hello extends Component {
static get props() {
return {
name: { attribute: true }
}
}
render({name}) {
return html`
<span>Hello ${name}</span>
`;
}
}
fritz.define('x-hello', Hello);index.html
<!doctype html>
<x-hello name="world"></x-hello>
<script type="module">
import fritz from 'https://unpkg.com/fritz/window.js';
fritz.use(new Worker("./worker.js"));
</script>Install
Yarn
yarn add fritznpm
npm install fritzLicense
BSD 2 Clause