ITADN

Incorrect function parameter, in readme example

#200Closedathrvk 创建于 2024-03-05
A
athrvkcommented
The function defined `getBrowserless` takes zero arguments but when called, it is passed an argument `browser` Can you explain/correct it? ```js const getContent = async url => { // create a browser context inside Chromium process const browserContext = browserlessFactory.createContext() const getBrowserless = () => browserContext const result = await getHTML(url, { getBrowserless }) // close the browser context after it's used await getBrowserless((browser) => browser.destroyContext()) return result } ```
关闭于 2024-03-05 1 条评论