MCPcopy Create free account
hub / github.com/Wscats/chrome-devtools-cli / download

Function download

src/core/background.ts:205–220  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

203 * 下载视频
204 */
205function download() {
206 let blob = new Blob(recordedBlobs, {
207 type: 'video/webm'
208 });
209 let url = window.URL.createObjectURL(blob);
210 let a = document.createElement('a');
211 a.style.display = 'none';
212 a.href = url;
213 a.download = 'test.webm';
214 document.body.appendChild(a);
215 a.click();
216 setTimeout(function () {
217 document.body.removeChild(a);
218 window.URL.revokeObjectURL(url);
219 }, 100);
220}
221
222// 通信线路:inject->content->background->devtool/panel->inject
223// 接收 content.ts 的消息,并发送到 devtool.ts/panel.ts 的消息

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected