MCPcopy
hub / github.com/github/hotkey / uninstall

Function uninstall

src/index.ts:76–87  ·  view source on GitHub ↗
(element: HTMLElement)

Source from the content-addressed store, hash-verified

74}
75
76export function uninstall(element: HTMLElement): void {
77 const leaves = elementsLeaves.get(element)
78 if (leaves && leaves.length) {
79 for (const leaf of leaves) {
80 leaf && leaf.delete(element)
81 }
82 }
83
84 if (Object.keys(hotkeyRadixTrie.children).length === 0) {
85 document.removeEventListener('keydown', keyDownHandler)
86 }
87}

Callers 1

test.jsFile · 0.90

Calls 2

getMethod · 0.80
deleteMethod · 0.45

Tested by

no test coverage detected