I'm new to FAST and I'm trying to get foundationElement to work. I've followed the basic steps in the docs but it's not working. this is my code:
import { html } from '@microsoft/fast-element';
import { FoundationElement } from '@microsoft/fast-foundation';
const template = html<Parent>`<p>I'm a parent</p>
<slot></slot>`;
class Parent extends FoundationElement {
connectedCallback() {
super.connectedCallback();
console.log('connection');
this.addEventListener('change', (e) => {
console.log('handle change event');
});
}
}
const parent = Parent.compose({ baseName: 'my-element', template });
provideFASTDesignSystem().register(parent());
My typescript version is 4.3 and the bundler i'm using is snowpack