| 1 | /** |
| 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. |
| 3 | * |
| 4 | * This source code is licensed under the MIT license found in the |
| 5 | * LICENSE file in the root directory of this source tree. |
| 6 | * |
| 7 | * @flow |
| 8 | */ |
| 9 | |
| 10 | export type EventSystemFlags = number; |
| 11 | |
| 12 | export const IS_EVENT_HANDLE_NON_MANAGED_NODE = 1; |
| 13 | export const IS_NON_DELEGATED = 1 << 1; |
| 14 | export const IS_CAPTURE_PHASE = 1 << 2; |
| 15 | export const IS_PASSIVE = 1 << 3; |
| 16 | export const IS_LEGACY_FB_SUPPORT_MODE = 1 << 4; |
| 17 | |
| 18 | export const SHOULD_NOT_DEFER_CLICK_FOR_FB_SUPPORT_MODE = |
| 19 | IS_LEGACY_FB_SUPPORT_MODE | IS_CAPTURE_PHASE; |
| 20 | |
| 21 | // We do not want to defer if the event system has already been |
| 22 | // set to LEGACY_FB_SUPPORT. LEGACY_FB_SUPPORT only gets set when |
| 23 | // we call willDeferLaterForLegacyFBSupport, thus not bailing out |
| 24 | // will result in endless cycles like an infinite loop. |
| 25 | // We also don't want to defer during event replaying. |
| 26 | export const SHOULD_NOT_PROCESS_POLYFILL_EVENT_PLUGINS = |
| 27 | IS_EVENT_HANDLE_NON_MANAGED_NODE | IS_NON_DELEGATED | IS_CAPTURE_PHASE; |