drop initialization flag on removed node

If the node is reattached later we want to rerun the initialization
logic to rebuild the controller.

Closes #135.
This commit is contained in:
Ilya Grigorik
2016-08-16 17:04:29 -07:00
parent 14e181388f
commit 221d107246

View File

@@ -225,6 +225,7 @@ chrome.extension.sendMessage({}, function(response) {
let id = node.dataset['vscid']; let id = node.dataset['vscid'];
let ctrl = document.querySelector(`div[data-vscid="${id}"]`) let ctrl = document.querySelector(`div[data-vscid="${id}"]`)
if (ctrl) { if (ctrl) {
node.classList.remove('vsc-initialized');
ctrl.remove(); ctrl.remove();
} }
} }