MCPcopy Create free account
hub / github.com/InverseUI/InverseUI-Recorder / handleSelect

Method handleSelect

modules/action/events/input.js:192–215  ·  view source on GitHub ↗
(event)

Source from the content-addressed store, hash-verified

190
191
192 handleSelect(event) {
193 this.sendMessage({
194 message: "recState"
195 }, (response) => {
196 if (response && response.recState) {
197 const target = event.target;
198 const xpaths = this.getXpaths(target);
199
200 const selection = {
201 start: target.selectionStart || 0,
202 end: target.selectionEnd || 0,
203 direction: target.selectionDirection || 'none',
204 selectedText: target.value ?
205 target.value.substring(target.selectionStart, target.selectionEnd) : ''
206 };
207
208 this.sendMessage({
209 message: "onSelect",
210 xPath: xpaths,
211 selection: selection
212 });
213 }
214 });
215 }
216
217 handleSubmit(event) {
218 this.sendMessage({

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected