✨ Added attributes.remove()
This commit is contained in:
parent
aa225a0cd2
commit
4e56629642
1 changed files with 7 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue