1
0
Fork 0

Added attributes.remove()

This commit is contained in:
Joost De Cock 2018-08-16 11:53:32 +02:00
parent aa225a0cd2
commit 4e56629642

View file

@ -19,6 +19,13 @@ Attributes.prototype.set = function(name, value) {
return this; return this;
}; };
/** Removes an attribute */
Attributes.prototype.remove = function(name) {
delete this.list[name];
return this;
};
/** Retrieves an attribute */ /** Retrieves an attribute */
Attributes.prototype.get = function(name) { Attributes.prototype.get = function(name) {
if (typeof this.list[name] === "undefined") return false; if (typeof this.list[name] === "undefined") return false;