-
-
Save anton-gorbikov/90c37086c38435bf013dd36455bc0f3d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var myDemoObject = { | |
element: document.querySelector('#toRemove'), | |
child: { | |
element: document.querySelector('#toRetain') | |
} | |
}; | |
// Removing DOM sub-tree after some user interactions | |
myDemoObject.element.parentNode.removeChild(myDemoObject.element); | |
// Clearing the reference to this DOM, it's not required anymore | |
myDemoObject.element = null; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment