vsn 0.1.102 → 0.1.103

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vsn",
3
- "version": "0.1.102",
3
+ "version": "0.1.103",
4
4
  "description": "SEO Friendly Javascript/Typescript Framework",
5
5
  "keywords": [
6
6
  "framework",
package/src/Tag.ts CHANGED
@@ -561,6 +561,7 @@ export class Tag extends DOMObject {
561
561
  public async finalize() {
562
562
  this._state = TagState.Built;
563
563
  this.callOnWrapped('$built', this, this.scope, this.element);
564
+ this.dispatch('$built', this);
564
565
  VisionHelper.nice(this.setupDeferredAttributes.bind(this));
565
566
  }
566
567
 
@@ -9,7 +9,6 @@ export class If extends Attribute {
9
9
 
10
10
  public async compile() {
11
11
  const statement: string = this.getAttributeValue();
12
- console.log('if statement for', this.tag.element, statement);
13
12
  this.tree = new Tree(statement);
14
13
  await this.tree.prepare(this.tag.scope, this.tag.dom, this.tag);
15
14
  await super.compile();
@@ -34,10 +33,8 @@ export class If extends Attribute {
34
33
  const result: boolean = await this.tree.evaluate(this.tag.scope, this.tag.dom, this.tag);
35
34
  if (result) {
36
35
  this.tag.show();
37
- console.log('show', this.tag.element);
38
36
  } else {
39
37
  this.tag.hide();
40
- console.log('hide', this.tag.element);
41
38
  }
42
39
  }
43
40
  }
@@ -189,6 +189,10 @@ export class List extends Attribute {
189
189
  if (cls) {
190
190
  if (!obj || !(obj instanceof cls)) {
191
191
  obj = new cls(obj);
192
+ this.tag.once('$built', () => {
193
+ if (obj['$built'])
194
+ obj['$built'](this.tag, this.tag.scope, this.tag.element);
195
+ });
192
196
  }
193
197
  }
194
198
 
package/src/version.ts CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.1.102';
1
+ export const VERSION = '0.1.103';
2
2