Created
September 23, 2015 20:59
-
-
Save koonuf/d0dfe86d1b5081d8eb90 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
<html> | |
<head> | |
<script> | |
function setAndClear() { | |
action(); | |
clear(); | |
} | |
function clear() { | |
delete window.myInst; | |
} | |
function action() { | |
window.myInst = new MyClass(); | |
} | |
function MyClass() { | |
this.a = "test"; | |
} | |
</script> | |
</head> | |
<body> | |
<button onclick="setAndClear()">Set and clear</button> | |
<button onclick="action()">Action</button> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment