2
0
mirror of https://github.com/esiur/iui.git synced 2026-04-04 06:58:22 +00:00
This commit is contained in:
2021-11-15 00:11:12 +03:00
parent 589c4f3227
commit e52b89fb4d
13 changed files with 213 additions and 41 deletions

View File

@@ -5,6 +5,22 @@ export default class BindingList extends Array {
super();
this.target = target;
this.scope = scope;
this.events = [];
}
destroy(){
for(var i = 0; i < this.length; i++)
this[i].unbind();
this.scope = {};
this.target = null;
for(var i = 0; i < this.events.length; i++)
this.target.removeEventListener(this.events[i].name, this.events[i].handle);
}
addEvent(name, handle)
{
this.target.addEventListener(name, handle);
this.events.push({name, handle})
}
getArgumentsNames(){