MCPcopy
hub / github.com/basecamp/trix / startComposition

Function startComposition

src/test/test_helpers/input_helpers.js:123–133  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

121}
122
123export const startComposition = async (data) => {
124 const element = document.activeElement
125 triggerEvent(element, "compositionstart", { data: "" })
126 triggerInputEvent(element, "beforeinput", { inputType: "insertCompositionText", data })
127 triggerEvent(element, "compositionupdate", { data })
128 triggerEvent(element, "input")
129
130 const node = document.createTextNode(data)
131 insertNode(node)
132 await selectNode(node)
133}
134
135export const updateComposition = async (data) => {
136 const element = document.activeElement

Callers 1

Calls 4

triggerEventFunction · 0.90
insertNodeFunction · 0.90
selectNodeFunction · 0.90
triggerInputEventFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…