Skip to content

Instantly share code, notes, and snippets.

@danielschonfeld
Created April 23, 2014 20:42
Show Gist options
  • Save danielschonfeld/11231690 to your computer and use it in GitHub Desktop.
Save danielschonfeld/11231690 to your computer and use it in GitHub Desktop.
DOMMutationMethods: {
value: function(node, value) {
if (value === undefined) {
node.removeAttribute('value');
} else if(node.value != value) {
node.value = value;
} else if(node.value === null) {
node.value = null;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment