(event: MouseEvent)
| 159 | } |
| 160 | |
| 161 | const onMouseClick = (event: MouseEvent) => { |
| 162 | event.preventDefault(); |
| 163 | const target = event.target as HTMLElement; |
| 164 | |
| 165 | if (target.classList.contains(CLASSES.nodeSelected)) { |
| 166 | target.classList.remove(CLASSES.nodeSelected); |
| 167 | return; |
| 168 | } |
| 169 | |
| 170 | if (!canSelect(target)) return; |
| 171 | |
| 172 | target.classList.add(CLASSES.nodeSelected); |
| 173 | // const clipData = clipNode(target, false); |
| 174 | // useExtensionStore.getState().setClipData({ |
| 175 | // type: "manualSelection", |
| 176 | // data: clipData, |
| 177 | // }); |
| 178 | }; |
| 179 | |
| 180 | function registerClickListeners(doc: Document) { |
| 181 | doc.body.addEventListener("click", onMouseClick); |
nothing calls this directly
no test coverage detected