BlockSuite API Documentation / @blocksuite/block-std / UIEventDispatcher
Class: UIEventDispatcher ​
Contents ​
Constructors ​
new UIEventDispatcher(std) ​
new UIEventDispatcher(
std):UIEventDispatcher
Parameters ​
• std: BlockStdScope
Returns ​
Source ​
block-std/src/event/dispatcher.ts:80
Properties ​
_clipboardControl ​
private_clipboardControl:ClipboardControl
Source ​
block-std/src/event/dispatcher.ts:78
_handlersMap ​
private_handlersMap:Record<"cut"|"blur"|"click"|"copy"|"drop"|"focus"|"paste"|"wheel"|"doubleClick"|"tripleClick"|"pointerDown"|"pointerMove"|"pointerUp"|"pointerOut"|"dragStart"|"dragMove"|"dragEnd"|"keyDown"|"keyUp"|"selectionChange"|"compositionStart"|"compositionUpdate"|"compositionEnd"|"beforeInput"|"contextMenu",EventHandlerRunner[]>
Source ​
block-std/src/event/dispatcher.ts:71
_keyboardControl ​
private_keyboardControl:KeyboardControl
Source ​
block-std/src/event/dispatcher.ts:76
_pointerControl ​
private_pointerControl:PointerControl
Source ​
block-std/src/event/dispatcher.ts:75
_rangeControl ​
private_rangeControl:RangeControl
Source ​
block-std/src/event/dispatcher.ts:77
disposables ​
disposables:
DisposableGroup
Source ​
block-std/src/event/dispatcher.ts:69
std ​
std:
BlockStdScope
Source ​
block-std/src/event/dispatcher.ts:80
Accessors ​
_currentSelections ​
getprivate_currentSelections():BaseSelection[]
Returns ​
Source ​
block-std/src/event/dispatcher.ts:139
host ​
gethost():HTMLElement
Returns ​
HTMLElement
Source ​
block-std/src/event/dispatcher.ts:98
Methods ​
_bindEvents() ​
private_bindEvents():void
Returns ​
void
Source ​
block-std/src/event/dispatcher.ts:235
_buildEventScopeBySelection() ​
private_buildEventScopeBySelection(name):undefined|EventScope
Parameters ​
• name: "cut" | "blur" | "click" | "copy" | "drop" | "focus" | "paste" | "wheel" | "doubleClick" | "tripleClick" | "pointerDown" | "pointerMove" | "pointerUp" | "pointerOut" | "dragStart" | "dragMove" | "dragEnd" | "keyDown" | "keyUp" | "selectionChange" | "compositionStart" | "compositionUpdate" | "compositionEnd" | "beforeInput" | "contextMenu"
Returns ​
undefined | EventScope
Source ​
block-std/src/event/dispatcher.ts:208
_buildEventScopeByTarget() ​
private_buildEventScopeByTarget(name,target):undefined|EventScope
Parameters ​
• name: "cut" | "blur" | "click" | "copy" | "drop" | "focus" | "paste" | "wheel" | "doubleClick" | "tripleClick" | "pointerDown" | "pointerMove" | "pointerUp" | "pointerOut" | "dragStart" | "dragMove" | "dragEnd" | "keyDown" | "keyUp" | "selectionChange" | "compositionStart" | "compositionUpdate" | "compositionEnd" | "beforeInput" | "contextMenu"
• target: Node
Returns ​
undefined | EventScope
Source ​
block-std/src/event/dispatcher.ts:189
_getEventScope() ​
private_getEventScope(name,event):undefined|EventScope
Parameters ​
• name: "cut" | "blur" | "click" | "copy" | "drop" | "focus" | "paste" | "wheel" | "doubleClick" | "tripleClick" | "pointerDown" | "pointerMove" | "pointerUp" | "pointerOut" | "dragStart" | "dragMove" | "dragEnd" | "keyDown" | "keyUp" | "selectionChange" | "compositionStart" | "compositionUpdate" | "compositionEnd" | "beforeInput" | "contextMenu"
• event: Event
Returns ​
undefined | EventScope
Source ​
block-std/src/event/dispatcher.ts:143
add() ​
add(
name,handler,options?): () =>void
Parameters ​
• name: "cut" | "blur" | "click" | "copy" | "drop" | "focus" | "paste" | "wheel" | "doubleClick" | "tripleClick" | "pointerDown" | "pointerMove" | "pointerUp" | "pointerOut" | "dragStart" | "dragMove" | "dragEnd" | "keyDown" | "keyUp" | "selectionChange" | "compositionStart" | "compositionUpdate" | "compositionEnd" | "beforeInput" | "contextMenu"
• handler: UIEventHandler
• options?: EventOptions
Returns ​
Function
Returns ​
void
Source ​
block-std/src/event/dispatcher.ts:120
bindHotkey() ​
bindHotkey(...
args): () =>void
Parameters ​
• ...args: [Record<string, UIEventHandler>, EventOptions]
Returns ​
Function
Returns ​
void
Source ​
block-std/src/event/dispatcher.ts:136
buildEventScope() ​
buildEventScope(
name,flavours,paths):undefined|EventScope
Parameters ​
• name: "cut" | "blur" | "click" | "copy" | "drop" | "focus" | "paste" | "wheel" | "doubleClick" | "tripleClick" | "pointerDown" | "pointerMove" | "pointerUp" | "pointerOut" | "dragStart" | "dragMove" | "dragEnd" | "keyDown" | "keyUp" | "selectionChange" | "compositionStart" | "compositionUpdate" | "compositionEnd" | "beforeInput" | "contextMenu"
• flavours: string[]
• paths: string[][]
Returns ​
undefined | EventScope
Source ​
block-std/src/event/dispatcher.ts:160
mount() ​
mount():
void
Returns ​
void
Source ​
block-std/src/event/dispatcher.ts:87
run() ​
run(
name,context,scope?):void
Parameters ​
• name: "cut" | "blur" | "click" | "copy" | "drop" | "focus" | "paste" | "wheel" | "doubleClick" | "tripleClick" | "pointerDown" | "pointerMove" | "pointerUp" | "pointerOut" | "dragStart" | "dragMove" | "dragEnd" | "keyDown" | "keyUp" | "selectionChange" | "compositionStart" | "compositionUpdate" | "compositionEnd" | "beforeInput" | "contextMenu"
• context: UIEventStateContext
• scope?: EventScope
Returns ​
void
Source ​
block-std/src/event/dispatcher.ts:102
unmount() ​
unmount():
void
Returns ​
void
Source ​
block-std/src/event/dispatcher.ts:94
Generated using typedoc-plugin-markdown and TypeDoc