MCPcopy Create free account
hub / github.com/zxlie/FeHelper / _isEditableShortcutTarget

Function _isEditableShortcutTarget

apps/json-format/content-script.js:394–407  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

392 };
393
394 let _isEditableShortcutTarget = target => {
395 if (!target || target === document || target === window) {
396 return false;
397 }
398 let el = target.nodeType === 1 ? target : target.parentElement;
399 if (!el) {
400 return false;
401 }
402 if (el.isContentEditable) {
403 return true;
404 }
405 let tagName = (el.tagName || '').toLowerCase();
406 return /^(input|textarea|select)$/i.test(tagName) || !!(el.closest && el.closest('input, textarea, select, [contenteditable="true"]'));
407 };
408
409 let _bindOmniShortcuts = () => {
410 if (omniShortcutsBound) {

Callers 1

_bindOmniShortcutsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected