Permalink
Browse files

Support BrowserContext

Fixes #58.
  • Loading branch information...
zploskey committed Jun 10, 2018
1 parent 68d1253 commit 18e2a945f0b586ecd81bb70fd63c1295c7c9647a
Showing with 19 additions and 1 deletion.
  1. +1 −0 lib/js/src/BrowserContext.js
  2. +6 −0 src/Browser.re
  3. +11 −0 src/BrowserContext.re
  4. +1 −1 src/Target.re

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -2,8 +2,14 @@ type t = Types.browser;

external empty : unit => t = "%identity";

[@bs.send] external browserContexts : t => array(BrowserContext.t) = "";

[@bs.send] external close : t => Js.Promise.t(unit) = "";

[@bs.send]
external createIncognitoBrowserContext : t => Js.Promise.t(BrowserContext.t) =
"";

[@bs.send] external disconnect : t => unit = "";

[@bs.send] external newPage : t => Js.Promise.t(Page.t) = "";
@@ -0,0 +1,11 @@
type t;

[@bs.send] external browser : t => Types.browser = "";

[@bs.send] external close : t => Js.Promise.t(unit) = "";

[@bs.send] external isIncognito : t => bool = "";

[@bs.send] external newPage : t => Js.Promise.t(Page.t) = "";

[@bs.send] external targets : t => array(Types.target) = "";
@@ -22,7 +22,7 @@ let pageTypeFromJs = targetTypeFromJs;

[@bs.send] external browser : t => Types.browser = "";

/* TODO: browserContext() */
[@bs.send] external browserContext : t => BrowserContext.t = "";

[@bs.send] external createCDPSession : t => Js.Promise.t(CDPSession.t) = "";

0 comments on commit 18e2a94

Please sign in to comment.