vsn 0.1.103 → 0.1.104

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.103",
3
+ "version": "0.1.104",
4
4
  "description": "SEO Friendly Javascript/Typescript Framework",
5
5
  "keywords": [
6
6
  "framework",
package/src/DOM.ts CHANGED
@@ -269,6 +269,9 @@ export class DOM extends EventDispatcher {
269
269
  if (isRoot) {
270
270
  document.body.setAttribute('vsn-root', '');
271
271
  document.ondragover = (e) => e.cancelable && e.preventDefault(); // Allow dragging over document
272
+ this._root = await this.buildTag(document.body, true);
273
+ this._root.createScope(true);
274
+ await this.setupTags([this._root]);
272
275
  }
273
276
 
274
277
  // Setup components first
@@ -294,8 +297,6 @@ export class DOM extends EventDispatcher {
294
297
  if (tag)
295
298
  newTags.push(tag);
296
299
  }
297
- if (isRoot)
298
- this._root = await this.getTagForElement(document.body);
299
300
 
300
301
  await this.setupTags(newTags);
301
302
 
@@ -370,7 +371,7 @@ export class DOM extends EventDispatcher {
370
371
  await this.resetBranch(t);
371
372
  }
372
373
 
373
- if (tag && tag.uniqueScope && tag.parentTag) {
374
+ if (tag && tag.parentTag && tag.uniqueScope) {
374
375
  tag.scope.parentScope = tag.parentTag.scope;
375
376
  }
376
377
  }
@@ -99,7 +99,7 @@ export class List extends Attribute {
99
99
  const tag: Tag = await this.tag.dom.getTagForElement(element);
100
100
  if (tag) {
101
101
  this.tags.push(tag);
102
- this.items.push(tag.scope.wrapped || tag.scope);
102
+ this.items.push(tag.scope.get(this.listItemName) || tag.scope.wrapped || tag.scope);
103
103
  }
104
104
  }
105
105
 
package/src/version.ts CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.1.103';
1
+ export const VERSION = '0.1.104';
2
2