Permalink
Browse files

Add Page.setCacheEnabled()

  • Loading branch information...
zploskey committed Mar 14, 2018
1 parent 6781d47 commit eb6e83bf54cc088d57c81f5d8d2184b4fd0ba8f9
Showing with 15 additions and 0 deletions.
  1. +5 −0 lib/js/src/Page.js
  2. +10 −0 src/Page.re

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

Oops, something went wrong.
@@ -291,6 +291,16 @@ external select :
(~selector: string, ~values: array(string)) => Js.Promise.t(array(string)) =
"";

[@bs.send.pipe: t]
external setCacheEnabled : (~enabled: Js.boolean) => Js.Promise.t(unit) = "";

/**
* Toggles ignoring cache for each request based on the enabled state.
* Caching is enabled by default.
*/
let setCacheEnabled = (~enabled, ~page) =>
page |> setCacheEnabled(~enabled=Js.Boolean.to_js_boolean(enabled));

/**
* Change the default maximum navigation time of 30 seconds for the following:
* - `Page.goto`

0 comments on commit eb6e83b

Please sign in to comment.