diff --git a/src/attributes.js b/src/attributes.js index 8107169ad7b..62f462c2d41 100644 --- a/src/attributes.js +++ b/src/attributes.js @@ -19,6 +19,13 @@ Attributes.prototype.set = function(name, value) { return this; }; +/** Removes an attribute */ +Attributes.prototype.remove = function(name) { + delete this.list[name]; + + return this; +}; + /** Retrieves an attribute */ Attributes.prototype.get = function(name) { if (typeof this.list[name] === "undefined") return false;