on method
JSFunction
on(
- String eventType,
- JSFunction callback, [
- JSObject? cancelCallbackOrContext,
- JSObject? context,
Listens for data changes at a particular location.
The provided callback function is returned unmodified. This is just for
convenience if you want to pass an inline function to on()
but store the
callback function for later passing to off()
.
Implementation
external JSFunction on(
String eventType,
// (a: DataSnapshot, b?: string | null) => any
JSFunction callback, [
// (a: Error) => any)
JSObject? cancelCallbackOrContext,
JSObject? context,
]);