Firebase how to stop Listener [duplicate]
This question already has an answer here:
How to remove listener from Firebase Realtime Database
3 answers
Can I stop datasnapshot when my global boolean is true without waiting ending execution of listener and without limitToFirst. I have some verification in event listener because I need to verify some data and I need make ending in listener
marked as duplicate by André Kool, Frank van Puffelen
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 26 '18 at 15:09
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
How to remove listener from Firebase Realtime Database
3 answers
Can I stop datasnapshot when my global boolean is true without waiting ending execution of listener and without limitToFirst. I have some verification in event listener because I need to verify some data and I need make ending in listener
marked as duplicate by André Kool, Frank van Puffelen
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 26 '18 at 15:09
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
How to remove listener from Firebase Realtime Database
3 answers
Can I stop datasnapshot when my global boolean is true without waiting ending execution of listener and without limitToFirst. I have some verification in event listener because I need to verify some data and I need make ending in listener
This question already has an answer here:
How to remove listener from Firebase Realtime Database
3 answers
Can I stop datasnapshot when my global boolean is true without waiting ending execution of listener and without limitToFirst. I have some verification in event listener because I need to verify some data and I need make ending in listener
This question already has an answer here:
How to remove listener from Firebase Realtime Database
3 answers
edited Nov 26 '18 at 15:06
JakeSteam
2,57352642
2,57352642
asked Nov 26 '18 at 12:23
Andrei GospodarencoAndrei Gospodarenco
8919
8919
marked as duplicate by André Kool, Frank van Puffelen
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 26 '18 at 15:09
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by André Kool, Frank van Puffelen
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 26 '18 at 15:09
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
You can remove the reference's listener with removeEventListener.
For example: ref.removeEventListener(listener);
ref = Reference you initially set the listener on.
listener = The listener (e.g. this if called within the listener).
im sorry but how I can understand when listener is removed?
– Andrei Gospodarenco
Nov 26 '18 at 18:59
after removing listener is working, and is removing many times because it is true value in my verification, why it can be
– Andrei Gospodarenco
Nov 26 '18 at 19:01
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You can remove the reference's listener with removeEventListener.
For example: ref.removeEventListener(listener);
ref = Reference you initially set the listener on.
listener = The listener (e.g. this if called within the listener).
im sorry but how I can understand when listener is removed?
– Andrei Gospodarenco
Nov 26 '18 at 18:59
after removing listener is working, and is removing many times because it is true value in my verification, why it can be
– Andrei Gospodarenco
Nov 26 '18 at 19:01
add a comment |
You can remove the reference's listener with removeEventListener.
For example: ref.removeEventListener(listener);
ref = Reference you initially set the listener on.
listener = The listener (e.g. this if called within the listener).
im sorry but how I can understand when listener is removed?
– Andrei Gospodarenco
Nov 26 '18 at 18:59
after removing listener is working, and is removing many times because it is true value in my verification, why it can be
– Andrei Gospodarenco
Nov 26 '18 at 19:01
add a comment |
You can remove the reference's listener with removeEventListener.
For example: ref.removeEventListener(listener);
ref = Reference you initially set the listener on.
listener = The listener (e.g. this if called within the listener).
You can remove the reference's listener with removeEventListener.
For example: ref.removeEventListener(listener);
ref = Reference you initially set the listener on.
listener = The listener (e.g. this if called within the listener).
answered Nov 26 '18 at 14:58
JakeSteamJakeSteam
2,57352642
2,57352642
im sorry but how I can understand when listener is removed?
– Andrei Gospodarenco
Nov 26 '18 at 18:59
after removing listener is working, and is removing many times because it is true value in my verification, why it can be
– Andrei Gospodarenco
Nov 26 '18 at 19:01
add a comment |
im sorry but how I can understand when listener is removed?
– Andrei Gospodarenco
Nov 26 '18 at 18:59
after removing listener is working, and is removing many times because it is true value in my verification, why it can be
– Andrei Gospodarenco
Nov 26 '18 at 19:01
im sorry but how I can understand when listener is removed?
– Andrei Gospodarenco
Nov 26 '18 at 18:59
im sorry but how I can understand when listener is removed?
– Andrei Gospodarenco
Nov 26 '18 at 18:59
after removing listener is working, and is removing many times because it is true value in my verification, why it can be
– Andrei Gospodarenco
Nov 26 '18 at 19:01
after removing listener is working, and is removing many times because it is true value in my verification, why it can be
– Andrei Gospodarenco
Nov 26 '18 at 19:01
add a comment |