Home / File/ ScrollEndEventPlugin.js — react Source File

ScrollEndEventPlugin.js — react Source File

Architecture documentation for ScrollEndEventPlugin.js, a javascript file in the react codebase. 19 imports, 1 dependents.

File javascript BabelCompiler Validation 19 imports 1 dependents 6 functions

Entity Profile

Dependency Diagram

graph LR
  f81462d0_b06e_fbf9_f1b8_93352f59d5eb["ScrollEndEventPlugin.js"]
  441cc620_4cb4_9cec_2f7a_93b0594f4707["PluginModuleType.js"]
  f81462d0_b06e_fbf9_f1b8_93352f59d5eb --> 441cc620_4cb4_9cec_2f7a_93b0594f4707
  4e9925e9_ca97_8d79_6ffa_a9347d262615["DOMEventNames.js"]
  f81462d0_b06e_fbf9_f1b8_93352f59d5eb --> 4e9925e9_ca97_8d79_6ffa_a9347d262615
  816b54e5_c63c_f8b2_68e8_0c637e281f03["DOMPluginEventSystem.js"]
  f81462d0_b06e_fbf9_f1b8_93352f59d5eb --> 816b54e5_c63c_f8b2_68e8_0c637e281f03
  e8ab76a4_05c2_cc4f_1bc2_aec96b5daa8c["EventSystemFlags.js"]
  f81462d0_b06e_fbf9_f1b8_93352f59d5eb --> e8ab76a4_05c2_cc4f_1bc2_aec96b5daa8c
  3632e1a4_9237_b583_7260_c67d392d0405["ReactSyntheticEventType.js"]
  f81462d0_b06e_fbf9_f1b8_93352f59d5eb --> 3632e1a4_9237_b583_7260_c67d392d0405
  e1c602b7_5988_fa00_bb9f_269d66d38107["EventRegistry.js"]
  f81462d0_b06e_fbf9_f1b8_93352f59d5eb --> e1c602b7_5988_fa00_bb9f_269d66d38107
  db2a0ac3_1faf_8e02_55e8_f299ce8da5e9["registerTwoPhaseEvent"]
  f81462d0_b06e_fbf9_f1b8_93352f59d5eb --> db2a0ac3_1faf_8e02_55e8_f299ce8da5e9
  9c3d71d9_41af_c5e7_cd35_d25bbf6cf606["SyntheticEvent.js"]
  f81462d0_b06e_fbf9_f1b8_93352f59d5eb --> 9c3d71d9_41af_c5e7_cd35_d25bbf6cf606
  c30b243e_ec29_69c6_2af4_f9dbe2733733["isEventSupported.js"]
  f81462d0_b06e_fbf9_f1b8_93352f59d5eb --> c30b243e_ec29_69c6_2af4_f9dbe2733733
  849b528c_c7f4_c2eb_ce7a_1b4cea872d42["isEventSupported"]
  f81462d0_b06e_fbf9_f1b8_93352f59d5eb --> 849b528c_c7f4_c2eb_ce7a_1b4cea872d42
  0d9ca2c0_8ba8_d861_ef7c_cea0ecdd2aa3["ReactDOMUpdateBatching.js"]
  f81462d0_b06e_fbf9_f1b8_93352f59d5eb --> 0d9ca2c0_8ba8_d861_ef7c_cea0ecdd2aa3
  f9e9db51_d79e_2bec_6b9a_825840efe3e5["batchedUpdates"]
  f81462d0_b06e_fbf9_f1b8_93352f59d5eb --> f9e9db51_d79e_2bec_6b9a_825840efe3e5
  002516b7_f4cf_8780_7915_6ea2f2f06333["processDispatchQueue"]
  f81462d0_b06e_fbf9_f1b8_93352f59d5eb --> 002516b7_f4cf_8780_7915_6ea2f2f06333
  ffe5dadd_1136_563b_f11c_19f1898c60be["accumulateSinglePhaseListeners"]
  f81462d0_b06e_fbf9_f1b8_93352f59d5eb --> ffe5dadd_1136_563b_f11c_19f1898c60be
  style f81462d0_b06e_fbf9_f1b8_93352f59d5eb fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 * @flow
 */
import type {AnyNativeEvent} from '../PluginModuleType';
import type {DOMEventName} from '../DOMEventNames';
import type {DispatchQueue} from '../DOMPluginEventSystem';
import type {EventSystemFlags} from '../EventSystemFlags';
import type {Fiber} from 'react-reconciler/src/ReactInternalTypes';
import type {ReactSyntheticEvent} from '../ReactSyntheticEventType';

import {registerTwoPhaseEvent} from '../EventRegistry';
import {SyntheticUIEvent} from '../SyntheticEvent';

import {canUseDOM} from 'shared/ExecutionEnvironment';
import isEventSupported from '../isEventSupported';

import {IS_CAPTURE_PHASE} from '../EventSystemFlags';

import {batchedUpdates} from '../ReactDOMUpdateBatching';
import {
  processDispatchQueue,
  accumulateSinglePhaseListeners,
  accumulateTwoPhaseListeners,
} from '../DOMPluginEventSystem';

import {
  getScrollEndTimer,
  setScrollEndTimer,
  clearScrollEndTimer,
} from '../../client/ReactDOMComponentTree';

import {enableScrollEndPolyfill} from 'shared/ReactFeatureFlags';

const isScrollEndEventSupported =
  enableScrollEndPolyfill && canUseDOM && isEventSupported('scrollend');

let isTouchStarted = false;
let isMouseDown = false;

function registerEvents() {
  registerTwoPhaseEvent('onScrollEnd', [
    'scroll',
    'scrollend',
    'touchstart',
    'touchcancel',
    'touchend',
    'mousedown',
    'mouseup',
  ]);
}

function manualDispatchScrollEndEvent(
  inst: Fiber,
  nativeEvent: AnyNativeEvent,
  target: EventTarget,
// ... (153 more lines)

Domain

Subdomains

Frequently Asked Questions

What does ScrollEndEventPlugin.js do?
ScrollEndEventPlugin.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain, Validation subdomain.
What functions are defined in ScrollEndEventPlugin.js?
ScrollEndEventPlugin.js defines 6 function(s): debounceScrollEnd, extractEvents, fireScrollEnd, manualDispatchScrollEndEvent, registerEvents, runEventInBatch.
What does ScrollEndEventPlugin.js depend on?
ScrollEndEventPlugin.js imports 19 module(s): DOMEventNames.js, DOMPluginEventSystem.js, EventRegistry.js, EventSystemFlags.js, ExecutionEnvironment, PluginModuleType.js, ReactDOMComponentTree.js, ReactDOMUpdateBatching.js, and 11 more.
What files import ScrollEndEventPlugin.js?
ScrollEndEventPlugin.js is imported by 1 file(s): DOMPluginEventSystem.js.
Where is ScrollEndEventPlugin.js in the architecture?
ScrollEndEventPlugin.js is located at packages/react-dom-bindings/src/events/plugins/ScrollEndEventPlugin.js (domain: BabelCompiler, subdomain: Validation, directory: packages/react-dom-bindings/src/events/plugins).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free