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

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -