Created
January 12, 2011 17:24
-
-
Save miketaylr/776501 to your computer and use it in GitHub Desktop.
DOM element logging test
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 elm = document.createElement('input') | |
elm.className = "testClass"; | |
elm.id = "testID"; | |
elm.setAttribute('data-rofl', 'copter') //elm['data-rofl'] = "copter"; doesn't work in webkit/firebug | |
elm.type = "search"; | |
elm.setAttribute('list', "testDatalist") // elm.list = "foo"; doesn't work in webkit/firebug | |
console.log(elm); | |
console.log(elm.outerHTML); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment