lemonadejs
Advanced tools
Comparing version 4.1.0 to 4.1.1
/** | ||
* LemonadeJS v4.1.0 (ESM build) | ||
* LemonadeJS v4.1.1 (ESM build) | ||
* | ||
@@ -442,4 +442,6 @@ * Website: https://lemonadejs.net | ||
* @param {string} property - property from the self | ||
* @param {any} oldValue property value | ||
* @param {any} newValue property value | ||
*/ | ||
const dispatch = function(property) { | ||
const dispatch = function(property, oldValue, newValue) { | ||
// Tracking object | ||
@@ -459,3 +461,3 @@ let o = R.tracking.get(this); | ||
if (typeof(this.onchange) === 'function') { | ||
this.onchange(property, o, this); | ||
this.onchange(property, o, this, oldValue, newValue); | ||
} | ||
@@ -499,8 +501,8 @@ } | ||
set: function (v) { | ||
// Only update if the value is really different | ||
if (value !== v) { | ||
value = v; | ||
// Refresh bound elements | ||
dispatch.call(this, p); | ||
} | ||
// Old value | ||
let oldValue = value; | ||
// New value | ||
value = v; | ||
// Refresh bound elements | ||
dispatch.call(this, p, oldValue, v); | ||
}, | ||
@@ -507,0 +509,0 @@ get: function () { |
/** | ||
* LemonadeJS v4.1.0 | ||
* LemonadeJS v4.1.1 | ||
* | ||
@@ -447,4 +447,6 @@ * Website: https://lemonadejs.net | ||
* @param {string} property - property from the self | ||
* @param {any} oldValue property value | ||
* @param {any} newValue property value | ||
*/ | ||
const dispatch = function(property) { | ||
const dispatch = function(property, oldValue, newValue) { | ||
// Tracking object | ||
@@ -464,3 +466,3 @@ let o = R.tracking.get(this); | ||
if (typeof(this.onchange) === 'function') { | ||
this.onchange(property, o, this); | ||
this.onchange(property, o, this, oldValue, newValue); | ||
} | ||
@@ -504,8 +506,8 @@ } | ||
set: function (v) { | ||
// Only update if the value is really different | ||
if (value !== v) { | ||
value = v; | ||
// Refresh bound elements | ||
dispatch.call(this, p); | ||
} | ||
// Old value | ||
let oldValue = value; | ||
// New value | ||
value = v; | ||
// Refresh bound elements | ||
dispatch.call(this, p, oldValue, v); | ||
}, | ||
@@ -512,0 +514,0 @@ get: function () { |
@@ -42,3 +42,3 @@ { | ||
"types": "dist/lemonade.d.ts", | ||
"version": "4.1.0" | ||
"version": "4.1.1" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
97471
2294