MCPcopy Index your code
hub / github.com/ChatLab/ChatLab / capture

Function capture

src/composables/useScreenCapture.ts:117–124  ·  view source on GitHub ↗

* 捕获指定选择器的元素 * @param selector CSS 选择器(class 或 id) * @param options 截屏选项

(selector: string, options?: ScreenCaptureOptions)

Source from the content-addressed store, hash-verified

115 * @param options 截屏选项
116 */
117 async function capture(selector: string, options?: ScreenCaptureOptions): Promise<boolean> {
118 const element = document.querySelector(selector) as HTMLElement | null
119 if (!element) {
120 captureError.value = `未找到元素: ${selector}`
121 return false
122 }
123 return captureElement(element, options)
124 }
125
126 /**
127 * 捕获指定的 DOM 元素

Callers

nothing calls this directly

Calls 1

captureElementFunction · 0.85

Tested by

no test coverage detected