From 4e566296420becf4792d52c7d4cba9ebcaed1892 Mon Sep 17 00:00:00 2001 From: Joost De Cock Date: Thu, 16 Aug 2018 11:53:32 +0200 Subject: [PATCH] :sparkles: Added attributes.remove() --- src/attributes.js | 7 +++++++ 1 file changed, 7 insertions(+) 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;