feat: CDPSession.detach
This commit is contained in:
parent
09e143a8b5
commit
f0c0e2a32b
4
src/Puppeteer.CDPSession.js
Normal file
4
src/Puppeteer.CDPSession.js
Normal file
@ -0,0 +1,4 @@
|
||||
import { CDPSession } from 'puppeteer'
|
||||
|
||||
/** @type {(_: CDPSession) => () => Promise<void>} */
|
||||
export const _detach = cdp => () => cdp.detach()
|
14
src/Puppeteer.CDPSession.purs
Normal file
14
src/Puppeteer.CDPSession.purs
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user