MCPcopy
hub / github.com/microsoft/playwright / call

Method call

packages/playwright-core/src/client/page.ts:903–916  ·  view source on GitHub ↗
(func: (source: structs.BindingSource, ...args: any[]) => any)

Source from the content-addressed store, hash-verified

901 }
902
903 async call(func: (source: structs.BindingSource, ...args: any[]) => any) {
904 try {
905 const frame = Frame.from(this._initializer.frame);
906 const source = {
907 context: frame._page!.context(),
908 page: frame._page!,
909 frame
910 };
911 const result = await func(source, ...this._initializer.args.map(parseResult));
912 this._channel.resolve({ result: serializeArgument(result) }).catch(() => {});
913 } catch (e) {
914 this._channel.reject({ error: serializeError(e) }).catch(() => {});
915 }
916 }
917}
918
919function trimUrl(param: any): string | undefined {

Callers 15

decorateServerFunction · 0.80
isRegExpFunction · 0.80
isRegExpFunction · 0.80
isDateFunction · 0.80
isURLFunction · 0.80
isTypedArrayFunction · 0.80
isArrayBufferFunction · 0.80
isRegExpFunction · 0.80
toJSONMethod · 0.80
toJSONFunction · 0.80
toJSONMethod · 0.80
toJSONMethod · 0.80

Calls 8

serializeArgumentFunction · 0.90
serializeErrorFunction · 0.90
funcFunction · 0.85
catchMethod · 0.80
contextMethod · 0.65
resolveMethod · 0.65
rejectMethod · 0.65
fromMethod · 0.45

Tested by

no test coverage detected