diff --git a/Architype.js b/Architype.js index 55f6d6f..4e0624d 100644 --- a/Architype.js +++ b/Architype.js @@ -40,7 +40,7 @@ class Architype { this.observer_ = new MutationObserver(e => { this.onChange(e); }); this.observer_.observe(this.editorElem_, { attributes: true, - attributeFilter: ['data-arch-value'], + attributeFilter: ['data-arch-refresh'], childList: true, subtree: true, }); diff --git a/Editor.js b/Editor.js index aea564f..e1c49c5 100644 --- a/Editor.js +++ b/Editor.js @@ -179,8 +179,7 @@ class Editor extends List { for (let entry of this.queryEntries('.highlight')) { entry.getElement().classList.toggle('highlight', false); } - // TODO: rename this to data-arch-refresh, make value noop everywhere - this.container_.setAttribute('data-arch-value', ''); + this.container_.setAttribute('data-arch-refresh', ''); e.stopPropagation(); e.preventDefault(); return; diff --git a/EditorGroup.js b/EditorGroup.js index 387f090..cf67e7b 100644 --- a/EditorGroup.js +++ b/EditorGroup.js @@ -71,7 +71,7 @@ class EditorGroup extends EditorEntryBase { case ' ': this.elem_.classList.toggle('highlight'); - this.elem_.setAttribute('data-arch-value', ''); + this.elem_.setAttribute('data-arch-refresh', ''); e.stopPropagation(); e.preventDefault(); break; diff --git a/EditorLabel.js b/EditorLabel.js index cbe5677..7438e21 100644 --- a/EditorLabel.js +++ b/EditorLabel.js @@ -38,7 +38,7 @@ class EditorLabel extends EditorEntryBase { } onInput() { - this.input_.setAttribute('data-arch-value', this.input_.value); + this.input_.setAttribute('data-arch-refresh', ''); } onInputKeyDown(e) { diff --git a/EditorLink.js b/EditorLink.js index ea565b4..9ab6126 100644 --- a/EditorLink.js +++ b/EditorLink.js @@ -73,7 +73,7 @@ class EditorLink extends EditorEntryBase { case ' ': this.elem_.classList.toggle('highlight'); - this.elem_.setAttribute('data-arch-value', ''); + this.elem_.setAttribute('data-arch-refresh', ''); e.stopPropagation(); e.preventDefault(); break; diff --git a/EditorNode.js b/EditorNode.js index c6492a2..e545b8a 100644 --- a/EditorNode.js +++ b/EditorNode.js @@ -57,7 +57,7 @@ class EditorNode extends EditorEntryBase { } onInput() { - this.input_.setAttribute('data-arch-value', this.input_.value); + this.input_.setAttribute('data-arch-refresh', ''); } onInputKeyDown(e) {