@react-native-firebase/app
Version:
A well tested, feature rich Firebase implementation for React Native, supporting iOS & Android. Individual module support for Admob, Analytics, Auth, Crash Reporting, Cloud Firestore, Database, Dynamic Links, Functions, Messaging (FCM), Remote Config, Sto
39 lines (37 loc) • 926 B
JavaScript
class Event {
eventPath = [];
NONE = 0;
CAPTURING_PHASE = 1;
AT_TARGET = 2;
BUBBLING_PHASE = 3;
// Flags
propagationStopped = false;
immediatePropagationStopped = false;
canceled = false;
initialized = true;
dispatched = false;
target = null;
currentTarget = null;
eventPhase = 0;
defaultPrevented = false;
isTrusted = false;
timeStamp = Date.now();
constructor(type, eventInitDict = {}) {
this.type = type;
this.bubbles = eventInitDict.bubbles !== undefined ? eventInitDict.bubbles : false;
this.cancelable = eventInitDict.cancelable !== undefined ? eventInitDict.cancelable : false;
}
preventDefault() {
if (this.cancelable) {
this.canceled = true;
}
}
stopPropagation() {
this.propagationStopped = true;
}
stopImmediatePropagation() {
this.propagationStopped = true;
this.immediatePropagationStopped = true;
}
}
export default Event;