Skip to content

Instantly share code, notes, and snippets.

@goofmint
Created August 22, 2017 07:14
Embed
What would you like to do?
function ObservableArray() {
this.name = 'Init';
};
ObservableArray.prototype.nameChange = function(name) {
this.dispatchEvent({
type: 'changeBefore',
data: this,
});
this.name = name;
this.dispatchEvent({
type: 'change',
data: this,
});
}
h5.mixin.eventDispatcher.mix(ObservableArray.prototype);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment