Created
October 12, 2011 02:16
-
-
Save tanabe/1280047 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 button = new Button(buttonElement); | |
| button.setState = function(state) { | |
| //handle buttonElement | |
| //change style, change size, insert DOM, brah brah brah | |
| }; | |
| //the other code accesses DOM tree directly | |
| Element.remove(buttonElement); | |
| button.setState('disable');//error! button cannot access buttonElement |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment