我看不到 FireFox 57 的任何输出,同时期待 'HyperHtmlElement' ...
<html>
<head>
<title>canvas element test</title>
<meta charset='utf-8'>
</head>
<body>
<g2-canvas></g2-canvas>
<script src="https://unpkg.com/hyperhtml@latest/min.js"></script>
<script src="https://unpkg.com/hyperhtml-element@latest/min.js"></script>
<script>
class G2Canvas extends HyperHTMLElement {
created() {
console.log('#');
this.render();
}
render() {
return this.html`<strong>HyperHTMLElement</strong>`;
}
}
G2Canvas.define('g2-canvas');
</script>
</body>
</html>
... 我究竟做错了什么 .. ?
谢谢。