package ezjs_extension

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Source file runtime_chrome.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
open Ezjs_min
open Extension_utils.Runtime
include Chrome_common.Runtime

let getBackgroundPage f = runtime##getBackgroundPage (wrap_callback f)
let openOptionsPage ?callback () = runtime##openOptionsPage (optdef wrap_callback callback)
let setUninstallURL ?callback s = runtime##setUninstallURL s (optdef wrap_callback callback)
let requestUpdateCheck f = runtime##requestUpdateCheck (wrap_callback f)
let restartAfterDelay ?callback i = runtime##restartAfterDelay i (optdef wrap_callback callback)
let sendMessage ?id ?options ?callback message =
  runtime##sendMessage (Optdef.option id) message (Optdef.option options)
    (Optdef.option callback)
let sendNativeMessage ?callback application message =
  runtime##sendNativeMessage (string application) message (Optdef.option callback)
let getPlatformInfo f =
  runtime##getPlatformInfo (wrap_callback (fun o -> f (to_platform_info o)))
let getPackageDirectoryEntry f =
  runtime##getPackageDirectoryEntry (wrap_callback f)
OCaml

Innovation. Community. Security.