mark-fe-fwk 2.0.1 → 2.0.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/dist/mark-fe-fwk.js +2 -3
- package/package.json +1 -1
package/dist/mark-fe-fwk.js
CHANGED
|
@@ -3,10 +3,8 @@ function addEventListener(eventName, handler, el) {
|
|
|
3
3
|
return handler
|
|
4
4
|
}
|
|
5
5
|
function addEventListeners(listeners = {}, el) {
|
|
6
|
-
const addedListeners = {};
|
|
7
6
|
Object.entries(listeners).forEach(([eventName, handler]) => {
|
|
8
|
-
|
|
9
|
-
addedListeners[eventName = listener];
|
|
7
|
+
addEventListener(eventName, handler, el);
|
|
10
8
|
});
|
|
11
9
|
}
|
|
12
10
|
function removeEventListeners(listeners = {}, el) {
|
|
@@ -452,6 +450,7 @@ function patchElement(oldVdom, newVdom) {
|
|
|
452
450
|
on: newEvents,
|
|
453
451
|
...newAttrs
|
|
454
452
|
} = newVdom.props;
|
|
453
|
+
const { listeners: oldListeners } = oldVdom;
|
|
455
454
|
patchAttrs(el, oldAttrs, newAttrs);
|
|
456
455
|
patchClasses(el, oldClass, newClass);
|
|
457
456
|
patchStyles(el, oldStyle, newStyle);
|