From 019aa200a0ee00a3de8ab09be8d6165619780885 Mon Sep 17 00:00:00 2001
From: Eugen Neuber <eugen.neuber@tugraz.at>
Date: Wed, 13 Jan 2021 08:42:09 +0100
Subject: [PATCH] Store mutated attributes on observation WIP

---
 packages/provider/src/provider.js | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/packages/provider/src/provider.js b/packages/provider/src/provider.js
index 014090ee..ac514bc0 100644
--- a/packages/provider/src/provider.js
+++ b/packages/provider/src/provider.js
@@ -106,7 +106,14 @@ export class Provider extends HTMLElement {
             // Use traditional 'for loops' for IE 11
             for(const mutation of mutationsList) {
                 if (mutation.type === 'attributes') {
-                    console.log('The ' + mutation.attributeName + ' attribute was modified.');
+                    const name = mutation.attributeName;
+                    console.log('The ' + name + ' attribute was modified.');
+                    that[name] = that.getAttribute(name);
+                    that.callbackStore.forEach(item => {
+                        if (item.name === name) {
+                            item.callback(value);
+                        }
+                    });
                 }
             }
         };
-- 
GitLab