ta-dom-components
Advanced tools
Comparing version 0.0.6 to 0.0.7
import TaDom from '/ta-dom-element.js'; | ||
import {anotherElement} from './another-element.js'; | ||
@@ -80,2 +81,3 @@ export default class MyElement extends TaDom.TaDomElement { | ||
connectedCallback() { | ||
super.connectedCallback(); | ||
this.mousePos$.subscribe(pos => { | ||
@@ -138,3 +140,4 @@ this.mousePos = pos; | ||
button({type:'button','on-click': event => this.hasThing = !this.hasThing}, 'toggle thing'), | ||
maybeThing() | ||
maybeThing(), | ||
anotherElement({name:'Howard'}) | ||
) | ||
@@ -141,0 +144,0 @@ ) |
@@ -6,3 +6,3 @@ import TaDom from '/ta-dom-element.js'; | ||
export default class MyOtherElement extends MyElement { | ||
export class MyOtherElement extends MyElement { | ||
@@ -43,2 +43,2 @@ // completely override css | ||
TaDom.customElement('my-other-element', MyOtherElement); | ||
export const myOtherElement = TaDom.customElement('my-other-element', MyOtherElement); |
{ | ||
"name": "ta-dom-components", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"description": "another web-component library", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -79,2 +79,4 @@ import TaDom from '/node_modules/ta-dom/index.js'; | ||
super(); | ||
// requestAnimationFrame id | ||
this.drawId_ = null; | ||
// define customer getter/setters for each property | ||
@@ -107,2 +109,5 @@ const sProps = this.constructor.properties; | ||
this.attachShadow({mode: 'open'}); | ||
} | ||
connectedCallback() { | ||
// initialize state | ||
@@ -210,3 +215,4 @@ this.setState(this.state_); | ||
// redraw dom on next animation frame | ||
window.requestAnimationFrame(() => { | ||
window.cancelAnimationFrame(this.drawId); | ||
this.drawId_ = window.requestAnimationFrame(() => { | ||
const newDom = this.render(); | ||
@@ -213,0 +219,0 @@ if (!newDom){ |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
28448
10
813
0