-
-
Save made-by-chris/c73edf3ff650de0e7d5d1bec1ca8b520 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
| $ = function(parameters) { | |
| this.state = {}; | |
| this.state.nodeList = document.querySelectorAll(parameters) | |
| this.state.dom = [].slice.call(state.nodeList) | |
| return this instanceof $ ? this : new $(parameters) | |
| } | |
| $.prototype = { | |
| left: function(){ | |
| console.log(this.state.dom.length, "turning left") | |
| return this | |
| }, | |
| right: function(){ | |
| console.log(this.state.dom.length, "turning right") | |
| return this | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment