Home / Function/ mousedown() — react Function Reference

mousedown() — react Function Reference

Architecture documentation for the mousedown() function in domEvents.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  31c8047d_4ef8_b203_4044_8d36bec78431["mousedown()"]
  fd9d5c95_e738_dee5_e510_e7b1e9e4ea39["domEvents.js"]
  31c8047d_4ef8_b203_4044_8d36bec78431 -->|defined in| fd9d5c95_e738_dee5_e510_e7b1e9e4ea39
  6e92fb29_1b7c_e506_23d4_54a296376a58["contextmenu()"]
  6e92fb29_1b7c_e506_23d4_54a296376a58 -->|calls| 31c8047d_4ef8_b203_4044_8d36bec78431
  9d0dad3b_5733_de1f_1a31_75b5db0ccd25["pointerdown()"]
  9d0dad3b_5733_de1f_1a31_75b5db0ccd25 -->|calls| 31c8047d_4ef8_b203_4044_8d36bec78431
  5d33cdd5_f0cb_068c_e5f4_c7bb90f089ae["pointerup()"]
  5d33cdd5_f0cb_068c_e5f4_c7bb90f089ae -->|calls| 31c8047d_4ef8_b203_4044_8d36bec78431
  c4628286_ce55_417e_4448_b94cef563ea7["createMouseEvent()"]
  31c8047d_4ef8_b203_4044_8d36bec78431 -->|calls| c4628286_ce55_417e_4448_b94cef563ea7
  style 31c8047d_4ef8_b203_4044_8d36bec78431 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/dom-event-testing-library/domEvents.js lines 379–394

export function mousedown(payload) {
  // The value of 'button' and 'buttons' for 'mousedown' must not be none.
  const button =
    payload == null || payload.button === buttonType.none
      ? buttonType.primary
      : payload.button;
  const buttons =
    payload == null || payload.buttons === buttonsType.none
      ? buttonsType.primary
      : payload.buttons;
  return createMouseEvent('mousedown', {
    ...payload,
    button,
    buttons,
  });
}

Domain

Subdomains

Frequently Asked Questions

What does mousedown() do?
mousedown() is a function in the react codebase, defined in packages/dom-event-testing-library/domEvents.js.
Where is mousedown() defined?
mousedown() is defined in packages/dom-event-testing-library/domEvents.js at line 379.
What does mousedown() call?
mousedown() calls 1 function(s): createMouseEvent.
What calls mousedown()?
mousedown() is called by 3 function(s): contextmenu, pointerdown, pointerup.

Analyze Your Own Codebase

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

Try Supermodel Free