package ezjs_extension
Binding for Chrome and Firefox extension API
Install
Dune Dependency
Authors
Maintainers
Sources
0.2.tar.gz
md5=656df77dabbefd03a5646cf72953b29c
sha512=f1e0f92683eb1605bb32ba2791ef046fd2312357f19fcc44ae06544708b789f2398666cf0adb1848e89c8f0a6f17615ac8437477cd7761f9cff5cff9969bb54d
doc/src/ezjs_extension.chrome-common/browser_action_chrome_common.ml.html
Source file browser_action_chrome_common.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
open Ezjs_min open Extension_utils type uint8Array = Typed_array.uint8Array class type imageData = object method data : uint8Array t prop method height : int prop method width : int prop end class type tabDetails = object method tabId : int optdef prop end class type titleDetails = object inherit tabDetails method title : js_string t opt prop end class type iconDetails = object inherit tabDetails method imageData : imageData t optdef prop method path : js_string t optdef prop end class type popupDetails = object inherit tabDetails method popup : js_string t opt prop end class type badgeDetails = object inherit tabDetails method text : js_string t opt prop end class type badgeColorDetails = object inherit tabDetails method color : js_string t opt prop end class type browserAction = object method setTitle : titleDetails t -> (unit -> unit) callback optdef -> unit meth method getTitle : tabDetails t -> (js_string t -> unit) callback -> unit meth method setIcon : iconDetails t -> (unit -> unit) callback optdef -> unit meth method setPopup : popupDetails t -> (unit -> unit) callback optdef -> unit meth method getPopup : tabDetails t -> (js_string t -> unit) callback -> unit meth method setBadgeText : badgeDetails t -> (unit -> unit) callback optdef -> unit meth method getBadgeText : tabDetails t -> (js_string t -> unit) callback -> unit meth method setBadgeBackgroundColor : badgeColorDetails t -> (unit -> unit) callback optdef -> unit meth method getBadgeBackgroundColor : tabDetails t -> (uint8Array t -> unit) callback -> unit meth method enable : int optdef -> (unit -> unit) callback optdef -> unit meth method disable : int optdef -> (unit -> unit) callback optdef -> unit meth method onClicked : Tabs.tab Browser.event t prop end let browserAction : browserAction t = Unsafe.global##.chrome##.browserAction let onClicked f = Browser.addListener1 browserAction##.onClicked f
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>