From 221d1072469758771b9199ec25613285c3b3b5db Mon Sep 17 00:00:00 2001 From: Ilya Grigorik Date: Tue, 16 Aug 2016 17:04:29 -0700 Subject: [PATCH] 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. --- inject.js | 1 + 1 file changed, 1 insertion(+) diff --git a/inject.js b/inject.js index 06a6f5a..e8c5863 100644 --- a/inject.js +++ b/inject.js @@ -225,6 +225,7 @@ chrome.extension.sendMessage({}, function(response) { let id = node.dataset['vscid']; let ctrl = document.querySelector(`div[data-vscid="${id}"]`) if (ctrl) { + node.classList.remove('vsc-initialized'); ctrl.remove(); } }