diff --git a/src/Puppeteer.CDPSession.js b/src/Puppeteer.CDPSession.js new file mode 100644 index 0000000..b9fbeb2 --- /dev/null +++ b/src/Puppeteer.CDPSession.js @@ -0,0 +1,4 @@ +import { CDPSession } from 'puppeteer' + +/** @type {(_: CDPSession) => () => Promise} */ +export const _detach = cdp => () => cdp.detach() diff --git a/src/Puppeteer.CDPSession.purs b/src/Puppeteer.CDPSession.purs new file mode 100644 index 0000000..440a3ef --- /dev/null +++ b/src/Puppeteer.CDPSession.purs @@ -0,0 +1,14 @@ +module Puppeteer.CDPSession where + +import Prelude + +import Control.Promise (Promise) +import Control.Promise as Promise +import Effect (Effect) +import Effect.Aff (Aff) +import Puppeteer.Base (CDPSession) + +foreign import _detach :: CDPSession -> Effect (Promise Unit) + +detach :: CDPSession -> Aff Unit +detach = Promise.toAffE <<< _detach