1
0
Fork 0

Further changes to handling of parts and copying their data

This commit is contained in:
Joost De Cock 2018-08-05 15:52:37 +02:00
parent 415a98f68e
commit fd80450d77
6 changed files with 30 additions and 44 deletions

View file

@ -18,6 +18,13 @@ attributes.prototype.add = function(name, value) {
return this;
};
/** Sets an attribute, overwriting existing value */
attributes.prototype.set = function(name, value) {
this.list[name] = [value];
return this;
};
/** Retrieves an attribute */
attributes.prototype.get = function(name) {
if (typeof this.list[name] === "undefined") return false;