@pacem/pacem-core 1.0.0-abel → 1.0.0-ampere
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/dist/browser/pacem-core.js +23 -4
- package/dist/browser/pacem-core.js.map +1 -1
- package/dist/browser/pacem-core.min.js +6 -1
- package/dist/browser/pacem-core.min.js.map +1 -1
- package/dist/bundle/pacem-core.min.mjs +9 -2
- package/dist/bundle/pacem-core.mjs +20 -2
- package/dist/bundle/pacem-core.mjs.map +2 -2
- package/dist/esm/adapter.js +5 -0
- package/dist/esm/command.js +5 -0
- package/dist/esm/comparers.js +5 -0
- package/dist/esm/converters.js +5 -0
- package/dist/esm/decorators-next.js +5 -0
- package/dist/esm/decorators.js +24 -5
- package/dist/esm/defaults.js +5 -0
- package/dist/esm/events.js +5 -0
- package/dist/esm/eventtarget.js +5 -0
- package/dist/esm/expression.js +5 -0
- package/dist/esm/index-animations.js +5 -0
- package/dist/esm/index-behaviors.js +5 -0
- package/dist/esm/index-components.js +5 -0
- package/dist/esm/index-iife.js +5 -0
- package/dist/esm/index-logging.js +5 -0
- package/dist/esm/index-net.js +5 -0
- package/dist/esm/index-root.js +5 -0
- package/dist/esm/index-ui.js +5 -0
- package/dist/esm/index.js +5 -0
- package/dist/esm/logger.js +5 -0
- package/dist/esm/prefix.js +5 -0
- package/dist/esm/promise.js +5 -0
- package/dist/esm/regex.js +5 -0
- package/dist/esm/storage.js +5 -0
- package/dist/esm/template.js +5 -0
- package/dist/esm/transforms.js +5 -0
- package/dist/esm/types.js +5 -0
- package/dist/esm/utils-customelement.js +5 -0
- package/dist/esm/utils-customevent.js +5 -0
- package/dist/esm/utils.js +5 -0
- package/package.json +1 -1
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* @pacem/pacem-core v1.0.0-ampere (https://js.pacem.it)
|
|
3
|
+
* Pacem (https://pacem.it)
|
|
4
|
+
* Licensed under Apache-2.0
|
|
5
|
+
*/
|
|
1
6
|
(function (pacemFoundation) {
|
|
2
7
|
'use strict';
|
|
3
8
|
|
|
@@ -3241,17 +3246,31 @@
|
|
|
3241
3246
|
if (binding) {
|
|
3242
3247
|
let value = CustomElementUtils.parseBindingAttribute(val, _this);
|
|
3243
3248
|
if (value instanceof Expression) {
|
|
3244
|
-
|
|
3245
|
-
// constant expression, just assign its value
|
|
3249
|
+
const executeRightAway = () => {
|
|
3246
3250
|
_this[prop] = value.evaluate();
|
|
3247
3251
|
processBinding(_this, prop /* remove eventual old bindings */);
|
|
3248
|
-
}
|
|
3249
|
-
|
|
3252
|
+
};
|
|
3253
|
+
const executeDelayed = () => {
|
|
3250
3254
|
var bindings = GET_VAL$5(_this, INSTANCE_BINDINGS_VAR, []);
|
|
3251
3255
|
bindings.push(plainAttrName);
|
|
3252
3256
|
if (!value.pending) {
|
|
3253
3257
|
processBinding(_this, prop, value);
|
|
3254
3258
|
}
|
|
3259
|
+
};
|
|
3260
|
+
if (value.independent && true) {
|
|
3261
|
+
try {
|
|
3262
|
+
// constant expression, just assign its value
|
|
3263
|
+
executeRightAway();
|
|
3264
|
+
}
|
|
3265
|
+
catch (e) {
|
|
3266
|
+
// there might be problems between loading and execution of the code
|
|
3267
|
+
// let's give it another chance
|
|
3268
|
+
console.warn(`Error occurred in early binding evaluation:\n${val}\n${e.message ?? e}`);
|
|
3269
|
+
executeDelayed();
|
|
3270
|
+
}
|
|
3271
|
+
}
|
|
3272
|
+
else {
|
|
3273
|
+
executeDelayed();
|
|
3255
3274
|
}
|
|
3256
3275
|
}
|
|
3257
3276
|
else {
|