@pacem/pacem-core 1.0.0-abel → 1.0.0-amaldi

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.
@@ -1,3 +1,8 @@
1
+ /*!
2
+ * @pacem/pacem-core v1.0.0-amaldi (https://js.pacem.it)
3
+ * Pacem (https://pacem.it)
4
+ * Licensed under Apache-2.0
5
+ */
1
6
  var __defProp = Object.defineProperty;
2
7
  var __export = (target, all) => {
3
8
  for (var name in all)
@@ -3047,19 +3052,32 @@ var CustomElement = (config) => {
3047
3052
  if (binding) {
3048
3053
  let value2 = CustomElementUtils.parseBindingAttribute(val, _this);
3049
3054
  if (value2 instanceof Expression) {
3050
- if (value2.independent && !moduleProofBindings) {
3055
+ const executeRightAway = () => {
3051
3056
  _this[prop] = value2.evaluate();
3052
3057
  processBinding(
3053
3058
  _this,
3054
3059
  prop
3055
3060
  /* remove eventual old bindings */
3056
3061
  );
3057
- } else {
3062
+ };
3063
+ const executeDelayed = () => {
3058
3064
  var bindings = GET_VAL2(_this, INSTANCE_BINDINGS_VAR, []);
3059
3065
  bindings.push(plainAttrName);
3060
3066
  if (!value2.pending) {
3061
3067
  processBinding(_this, prop, value2);
3062
3068
  }
3069
+ };
3070
+ if (value2.independent && !moduleProofBindings) {
3071
+ try {
3072
+ executeRightAway();
3073
+ } catch (e) {
3074
+ console.warn(`Error occurred in early binding evaluation:
3075
+ ${val}
3076
+ ${e.message ?? e}`);
3077
+ executeDelayed();
3078
+ }
3079
+ } else {
3080
+ executeDelayed();
3063
3081
  }
3064
3082
  } else {
3065
3083
  throw `Howcome? ${val} misinterpreted as ${plainAttrName} binding...`;