MCPcopy Create free account
hub / github.com/ChromeDevTools/devtools-frontend / #requestContent

Method #requestContent

front_end/core/sdk/Script.ts:300–310  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

298 }
299
300 async #requestContent(): Promise<TextUtils.ContentData.ContentDataOrError> {
301 if (!this.scriptId) {
302 return {error: i18nString(UIStrings.scriptRemovedOrDeleted)};
303 }
304 try {
305 return this.isWasm() ? await this.loadWasmContent() : await this.loadTextContent();
306 } catch {
307 // TODO(bmeurer): Propagate errors as exceptions / rejections.
308 return {error: i18nString(UIStrings.unableToFetchScriptSource)};
309 }
310 }
311
312 async getWasmBytecode(): Promise<ArrayBuffer> {
313 const base64 = await this.debuggerModel.target().debuggerAgent().invoke_getWasmBytecode({scriptId: this.scriptId});

Callers 1

requestContentDataMethod · 0.95

Calls 3

isWasmMethod · 0.95
loadWasmContentMethod · 0.95
loadTextContentMethod · 0.95

Tested by

no test coverage detected