MCPcopy Create free account
hub / github.com/deta/surf / runActionUsingWebview

Method runActionUsingWebview

packages/web-parser/src/index.ts:136–147  ·  view source on GitHub ↗
(document: Document, id: string, inputs?: WebServiceActionInputs)

Source from the content-addressed store, hash-verified

134 }
135
136 async runActionUsingWebview(document: Document, id: string, inputs?: WebServiceActionInputs) {
137 const webviewExtractor = this.createWebviewExtractor(document)
138
139 await webviewExtractor.initializeWebview()
140
141 // TODO - wait for the page to have fully loaded
142 await wait(3000)
143
144 const extracted = await webviewExtractor.runAction(id, inputs)
145
146 return extracted as DetectedResource | null
147 }
148
149 static useFallbackParser(document: Document, url: URL) {
150 const articleParser = new ArticleParser(url)

Callers

nothing calls this directly

Calls 4

initializeWebviewMethod · 0.80
waitFunction · 0.70
runActionMethod · 0.45

Tested by

no test coverage detected