Skip to content

Instantly share code, notes, and snippets.

@goofmint

goofmint/index.js

Created Aug 22, 2017
Embed
What would you like to do?
var observableArray = new ObservableArray;
observableArray.addEventListener('changeBefore', function(e) {
$('#result').val(`${$('#result').val()}\n,changeBefore event..name is ${e.data.name}`);
});
observableArray.addEventListener('change', function(e) {
$('#result').val(`${$('#result').val()}\n,change event..name is ${e.data.name}`);
});
observableArray.addEventListener('change', function(e) {
$('#result').val(`${$('#result').val()}\n,another change event..name is ${e.data.name}`);
});
observableArray.nameChange('Hello');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment