Skip to content

New package makes it easy to build web components

Compare
Choose a tag to compare
@matthewp matthewp released this 04 Oct 17:11
· 44 commits to master since this release

This is the first major release of can-stache-element, a library for building web components. StacheElement is like a new, better, version of can-component with an ES6 backed API.

import { StacheElement } from "can";

class HelloWorld extends StacheElement {
  static view = `Hello {{name}}`;

  static props = {
    name: "world"
  };
}

customElements.define("hello-world", HelloWorld);