onSnapshot method
Attaches a listener for DocumentSnapshot events.
@param onNext A callback to be called every time a new DocumentSnapshot
is available.
@param onError A callback to be called if the listen fails or is
cancelled. No further callbacks will occur.
@return An unsubscribe function that can be called to cancel
the snapshot listener.
Implementation
external void onSnapshot(
JSFunction onNext, [
JSFunction onError,
]);