Skip to content

Releases: canjs/can-stache-element

Test organization for CanJS production

24 Jun 17:39
Compare
Choose a tag to compare

This release hasn't a new feature, just tests organization in order to make canjs production tests.

Observable class fields support

12 Jun 19:23
Compare
Choose a tag to compare
  • Add observable class fields support:
class MyElement extends StacheElement {
		greetings = 'Hello';
                static get view() { return `{{ greetings }}` }
		static get props() {
		}
}
customElements.define('my-element', MyElement);

const el = new MyElement().initialize();
el.on('greeting', (ev, newVal, oldVal) => {
    // it should be observable, handle change here
});
el.greeting = 'Hola';
  • Observable class fields support documentation

#104

Import `can` package in docs

26 Nov 17:10
Compare
Choose a tag to compare

Use can package in documentation instead of can/everything:

import { StacheElement } from "can/everything"; -> import { StacheElement } from "can";

#99

1.0.1

08 Oct 21:31
Compare
Choose a tag to compare

Add StacheElement to can-namespace

This patch release adds StacheElement to can-namespace so it is available on the global can object.

New package makes it easy to build web components

04 Oct 17:11
Compare
Choose a tag to compare

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);

Fixed some links in the docs

17 Jul 19:13
Compare
Choose a tag to compare

Initial Release

17 Jul 19:12
Compare
Choose a tag to compare
class Basic extends StacheElement {
    static view = `
        <in-put inputValue:bind="this.first" handler:from="this.setFirst"></in-put>
        <in-put inputValue:bind="this.last" handler:from="this.setLast"></in-put>
        <p>{{this.fullName}}</p>
    `;

    static props = {
        first: { type: String, default: "Kevin" },
        last: { type: String, default: "McCallister" }
    };

    get fullName() {
        return `${this.first} ${this.last}`;
    }

    setFirst(val) {
        this.first = val;
    }

    setLast(val) {
        this.last = val;
    }
}
customElements.define("basic-app", Basic);

#59

v0.7.5

16 Jul 15:48
Compare
Choose a tag to compare

Add @Package so the GitHub & npm badges show up in the docs 1202828

Properties with DOM events warnings fix

09 Jul 20:30
Compare
Choose a tag to compare

Fixes uses of listenTo

09 Jul 16:05
Compare
Choose a tag to compare

listenTo was breaking due to the change to have addEventListener register real DOM events. This fixes it so that both DOM events and canjs' internal event handler system are registered.