detachAllEvents() or detachAllEvents(gid) convenience method

Hi,

I am working on a largish system with webix-jet and webix. I have some service classes that provide events, utilising the webix EventSystem. As some views containing different sub-views are destroyed, I need a convenient way of detaching all events.

I know I can store the ids returned by webix.attachEvent() and work with that, but find it very handy to have a method in webix.EventSystem like

https://snippet.webix.com/9pc299jd

Further to that, in some cases where I have multiple sub-views all using the same service, I need to be able to detach all the events for the sub-views being destroyed leaving the rest.

Going a bit further on the theme I came up with adding a forth argument to attachEvent, a group id. I am able to assign certain events to a unique group. And use that uid to detach all events that belong to the group.

https://snippet.webix.com/1wspx8yw

What do you think of this approach?

Thanks
Emil