Skip to content
Snippets Groups Projects
Commit 019aa200 authored by Neuber, Eugen Ramon's avatar Neuber, Eugen Ramon :speech_balloon:
Browse files

Store mutated attributes on observation WIP

parent 56cdc1ae
No related branches found
No related tags found
1 merge request!28Observer test
Pipeline #15665 passed with warnings
...@@ -106,7 +106,14 @@ export class Provider extends HTMLElement { ...@@ -106,7 +106,14 @@ export class Provider extends HTMLElement {
// Use traditional 'for loops' for IE 11 // Use traditional 'for loops' for IE 11
for(const mutation of mutationsList) { for(const mutation of mutationsList) {
if (mutation.type === 'attributes') { 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);
}
});
} }
} }
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment