Skip to content

Instantly share code, notes, and snippets.

@goofmint

goofmint/index.js

Created Aug 22, 2017
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