public
Last active

DOM element logging test

  • Download Gist
gistfile1.txt
1 2 3 4 5 6 7 8
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);

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.