Skip to content

Instantly share code, notes, and snippets.

@marcab
Created January 13, 2011 00:05
Show Gist options
  • Save marcab/777145 to your computer and use it in GitHub Desktop.
Save marcab/777145 to your computer and use it in GitHub Desktop.
Notice the number and order of the output.
function run_demo() {
var k = new goog.ds.JsDataSource([], 'mypath');
goog.ds.DataManager.getInstance().addListener(function (a,b) {console.log(a,b);}, k.getDataPath() + '/fi');
k.setChildNode('fee', {'data': 1});
k.setChildNode('fi', {'data': 2});
k.setChildNode('fo', {'data': 3});
k.setChildNode('fum', {'data': 4});
}
>mypath
>mypath/fi
>mypath
>mypath
>mypath
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment