javascript - Check for completion on the firebase js .forEach method? -


i know there's completion handler .set , .update, wondering if there .foreach.

for example, this:

firebase.database().ref().child('kid').orderbychild('date').on('value', function(snapshot) {     snapshot.foreach(function(kid) {      }, function(error) { //this error thrown      } }); 

if isn't possible, there workaround? need function call once .foreach method done running.

p.s. function stated in file, call normally.

no, synchronous javascript function. add line after function.


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -