@webqit/oohtml 1.10.1-0 → 1.10.3
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/LICENSE +21 -0
- package/dist/html-imports.js +2 -2
- package/dist/html-imports.js.map +2 -2
- package/dist/html-modules.js +2 -2
- package/dist/html-modules.js.map +2 -2
- package/dist/main.js +1 -1
- package/dist/main.js.map +2 -2
- package/dist/namespaced-html.js +2 -2
- package/dist/namespaced-html.js.map +1 -1
- package/dist/state-api.js.map +1 -1
- package/dist/subscript.js.map +1 -1
- package/package.json +1 -1
- package/src/html-modules/index.js +1 -1
- package/src/util.js +8 -6
package/package.json
CHANGED
|
@@ -372,7 +372,7 @@ export default function init( _config = {} ) {
|
|
|
372
372
|
Object.defineProperty(document, 'templatesReadyState', { get: () => templatesReadyState });
|
|
373
373
|
WebQit.DOM.ready.call(WebQit, () => {
|
|
374
374
|
loadingTemplates.forEach(promise => {
|
|
375
|
-
promise.catch(error => {
|
|
375
|
+
promise && promise.catch(error => {
|
|
376
376
|
console.warn(error);
|
|
377
377
|
});
|
|
378
378
|
});
|
package/src/util.js
CHANGED
|
@@ -114,9 +114,6 @@ const evalModuleExpr = (contexts, segment, collectionCallback) => {
|
|
|
114
114
|
var [ _reference, modifiers ] = parseScopeReferenceExpr(_reference);
|
|
115
115
|
// ------------
|
|
116
116
|
return contexts.reduce((list, context) => {
|
|
117
|
-
if (_internals(context, 'oohtml').has('queryCallback')) {
|
|
118
|
-
_internals(context, 'oohtml').get('queryCallback')();
|
|
119
|
-
}
|
|
120
117
|
var collection = collectionCallback(context);
|
|
121
118
|
if (_reference === '*') {
|
|
122
119
|
_reference = '(' + collection.keys().join('+') + ')';
|
|
@@ -154,20 +151,25 @@ const execScopeQuery = function(contexts, path, collectionCallback, advancementC
|
|
|
154
151
|
return [];
|
|
155
152
|
}
|
|
156
153
|
|
|
157
|
-
|
|
154
|
+
let segment = path.shift(), isStopSegmentIfCount;
|
|
158
155
|
if (segment.endsWith('.')) {
|
|
159
156
|
isStopSegmentIfCount = true;
|
|
160
157
|
segment = segment.substr(0, segment.length - 1).trim();
|
|
161
158
|
}
|
|
162
159
|
// -----------
|
|
163
|
-
|
|
160
|
+
let modules = evalModuleExpr(contexts, segment, collectionCallback);
|
|
161
|
+
modules.forEach(context => {
|
|
162
|
+
if (_internals(context, 'oohtml').has('queryCallback')) {
|
|
163
|
+
_internals(context, 'oohtml').get('queryCallback')();
|
|
164
|
+
}
|
|
165
|
+
});
|
|
164
166
|
// -----------
|
|
165
167
|
if (modules.length && isStopSegmentIfCount) {
|
|
166
168
|
return modules;
|
|
167
169
|
}
|
|
168
170
|
// -----------
|
|
169
171
|
if (path.length) {
|
|
170
|
-
|
|
172
|
+
let submodules = execScopeQuery(modules, path.slice(), collectionCallback, advancementCallback, level + 1);
|
|
171
173
|
if (submodules === -1) {
|
|
172
174
|
return advancementCallback(modules, level, true);
|
|
173
175
|
}
|