@webqit/oohtml 1.9.13 → 1.9.16

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.
Binary file
package/package.json CHANGED
@@ -14,7 +14,7 @@
14
14
  "wicg-proposal"
15
15
  ],
16
16
  "homepage": "https://webqit.io/tooling/oohtml",
17
- "version": "1.9.13",
17
+ "version": "1.9.16",
18
18
  "license": "MIT",
19
19
  "repository": {
20
20
  "type": "git",
@@ -40,7 +40,7 @@
40
40
  "dependencies": {
41
41
  "@webqit/browser-pie": "^0.0.17",
42
42
  "@webqit/observer": "^1.7.5",
43
- "@webqit/subscript": "^2.0.19",
43
+ "@webqit/subscript": "^2.0.26",
44
44
  "@webqit/util": "^0.8.7",
45
45
  "acorn": "^8.7.0"
46
46
  },
@@ -112,7 +112,7 @@ export default function init(_config = null, onDomReady = false) {
112
112
  this._connectToCompositionBlock();
113
113
  }
114
114
  WebQit.DOM.ready.call(WebQit, () => {
115
- this.resolve();
115
+ this.resolve('connected');
116
116
  });
117
117
  }
118
118
 
@@ -166,7 +166,7 @@ export default function init(_config = null, onDomReady = false) {
166
166
  /**
167
167
  * Resolves the slot
168
168
  */
169
- resolve() {
169
+ resolve(reason = null) {
170
170
  if (_any(importInertContexts, inertContext => this.el.closest(inertContext))) {
171
171
  return;
172
172
  }
@@ -357,23 +357,22 @@ export default function init(_config = null, onDomReady = false) {
357
357
  // Progressive resolution
358
358
  // ----------------------
359
359
 
360
- const resolveSlots = (el, exportName) => {
361
- const shouldResolve = (importEl, importName) => {
360
+ const resolveSlots = (el, exportName, reason = null) => {
361
+ const shouldResolve = (importElInstance, importName) => {
362
362
  return !exportName || importName === exportName || (
363
- exportName === true && ((this.importModifiers && ('search' in this.importModifiers)) || importEl.getAttribute(_meta.get('attr.exportsearch')))
363
+ exportName === true && ((importElInstance.importModifiers && ('search' in importElInstance.importModifiers)) || importElInstance.el.getAttribute(_meta.get('attr.exportsearch')))
364
364
  );
365
365
  };
366
366
  if (el.matches(_meta.get('element.import'))) {
367
367
  var importElInstance = Import.create(el);
368
- importElInstance.connectedCallback();
369
- if (shouldResolve(el, importElInstance.importID)) {
370
- importElInstance.resolve();
368
+ if (shouldResolve(importElInstance, importElInstance.importID)) {
369
+ importElInstance.resolve(reason);
371
370
  }
372
371
  } else {
373
372
  _internals(el, 'oohtml', 'imports').forEach((importEl, name) => {
374
- if (shouldResolve(importEl, name)) {
375
- var importElInstance = Import.create(importEl);
376
- importElInstance.resolve();
373
+ var importElInstance = Import.create(importEl);
374
+ if (shouldResolve(importElInstance, name)) {
375
+ importElInstance.resolve(`Resolution scope: ${reason}`);
377
376
  }
378
377
  });
379
378
  }
@@ -388,7 +387,7 @@ export default function init(_config = null, onDomReady = false) {
388
387
  // We resolve them again when reference to template changes
389
388
  mutations.onAttrChange(el, mr => {
390
389
  if (mr[0].target.getAttribute(mr[0].attributeName) !== mr[0].oldValue) {
391
- resolveSlots(el);
390
+ resolveSlots(el, null, `Attr-Change: ${mr[0].attributeName}`);
392
391
  }
393
392
  }, [_meta.get('attr.moduleref'), _meta.get('attr.importid')]);
394
393
  });
@@ -400,9 +399,9 @@ export default function init(_config = null, onDomReady = false) {
400
399
  }
401
400
  _arrFrom(document.querySelectorAll('[' + window.CSS.escape(_meta.get('attr.moduleref')) + ']')).forEach(el => {
402
401
  if (queryMatchPath(el.getAttribute(_meta.get('attr.moduleref')), e.detail.path)) {
403
- resolveSlots(el, true);
402
+ resolveSlots(el, true/* resolve imports with search() */, `'templatemutation' event: ${e.detail.path}, search()`);
404
403
  e.detail.addedExports.concat(e.detail.removedExports).forEach(exportGroup => {
405
- resolveSlots(el, exportGroup.name);
404
+ resolveSlots(el, exportGroup.name, `'templatemutation' event: ${e.detail.path}, ${exportGroup.name}`);
406
405
  });
407
406
  }
408
407
  });
@@ -41,7 +41,7 @@ export default function init( _config = null, onDomReady = false ) {
41
41
  }
42
42
  if ( embeds.has( scriptElement ) ) return;
43
43
 
44
- subscriptElement.implementScript( ownerNode, scriptElement )();
44
+ subscriptElement.implementScript( scriptElement, ownerNode )();
45
45
  subscriptElement.doConnectedCallback( ownerNode );
46
46
  embeds.add( scriptElement );
47
47