Why does Firebase's Realtime Database's child_removed event handler not execute?

后端 未结 1 1646
北海茫月
北海茫月 2021-01-24 07:01

My database contains:

user: {
  \'monkey\': \'banana\',
  \'bear\': \'fish\'
}

Why does the event handler not execute?

let db = fi         


        
相关标签:
1条回答
  • 2021-01-24 07:10

    This looks like some race going on with the code, because I tested and if you do something like this:

     setTimeout(function() {
        user.child('monkey').remove();
      },2000);
    

    it seems to work. Here is a fiddle I used to test it out, hope it helps:

    http://jsfiddle.net/bgthp4wc/

    0 讨论(0)
提交回复
热议问题