Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
window.myFunc = (function() {
var collectedObject = {
someData: document.querySelector('#myId')
},
retainedObject = {
someData: 'sample string'
};
collectedObject.someData.parentNode.removeChild(collectedObject.someData);
return function() {
debugger;
console.log(retainedObject.someData);
}
})();
window.myFunc();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment