MCPcopy Create free account
hub / github.com/editablejs/editable / findCheckbox

Function findCheckbox

packages/plugins/list/src/task/deserializer/html.ts:13–23  ·  view source on GitHub ↗
(el: DOMNode | null)

Source from the content-addressed store, hash-verified

11}
12
13const findCheckbox = (el: DOMNode | null): HTMLInputElement | null => {
14 if (!el) return null
15
16 if (el.nodeName === 'INPUT' && (el as HTMLInputElement).type === 'checkbox') {
17 return el as HTMLInputElement
18 }
19
20 const { firstChild } = el
21 if (!firstChild) return null
22 return findCheckbox(firstChild)
23}
24
25export const withTaskListHTMLDeserializerTransform: HTMLDeserializerWithTransform<
26 TaskListHTMLDeserializerOptions

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…