Skip to content

Instantly share code, notes, and snippets.

@Comandeer
Created February 26, 2015 20:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Comandeer/f9f965f572d0957b51bf to your computer and use it in GitHub Desktop.
Save Comandeer/f9f965f572d0957b51bf to your computer and use it in GitHub Desktop.
Polymer's polyfill for lacking support for arrays in form.elements. It really sucks.
//it's one of the ugliest hacks I've ever created…
for(var x in this.$)
{
if(!this.$.hasOwnProperty(x) ||x.indexOf('chars') !== 0)
continue;
var tmp = this.$[x];
if(tmp.checked)
range += chars[tmp.value];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment