Skip to content

Commit b45639b

Browse files
committed
Misc: fix documentation for 4.02.2
1 parent 407a64e commit b45639b

File tree

4 files changed

+79
-4
lines changed

4 files changed

+79
-4
lines changed

lib/dom.mli

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ module DocumentPosition : sig
6161
val add : mask -> mask -> mask
6262
val (+) : mask -> mask -> mask
6363
end
64+
6465
(** Specification of [Node] objects. *)
6566
class type node = object
6667
method nodeName : js_string t readonly_prop
@@ -173,16 +174,19 @@ val insertBefore : #node t -> #node t -> #node t opt -> unit
173174
The expression [insertBefore n c p] behave the same as
174175
[p##insertBefore(n, c)] but avoid the need of coercing the
175176
different objects to [node t]. *)
177+
176178
val replaceChild : #node t -> #node t -> #node t -> unit
177179
(** The expression [replaceChild p n c] behave the same as
178180
[p##replaceChild(n, c)] (replace [c] by [n] in [p])
179181
but avoid the need of coercing the
180182
different objects to [node t]. *)
183+
181184
val removeChild : #node t -> #node t -> unit
182185
(** The expression [removeChild n c] behave the same as
183186
[n##removeChild(c)] (remove [c] from [n])
184187
but avoid the need of coercing the
185188
different objects to [node t]. *)
189+
186190
val appendChild : #node t -> #node t -> unit
187191
(** The expression [appendChild n c] behave the same as
188192
[n##appendChild(c)] (appends [c] to [n])
@@ -226,13 +230,16 @@ end
226230

227231
val no_handler : ('a, 'b) event_listener
228232
(** Void event handler (Javascript [null] value). *)
233+
229234
val handler : (('e #event t as 'b) -> bool t) -> ('a, 'b) event_listener
230235
(** Create an event handler that invokes the provided function.
231236
If the handler returns false, the default action is prevented. *)
237+
232238
val full_handler : ('a -> ('e #event t as 'b) -> bool t) -> ('a, 'b) event_listener
233239
(** Create an event handler that invokes the provided function.
234240
The event target (implicit parameter [this]) is also passed as
235241
argument to the function. *)
242+
236243
val invoke_handler : ('a, 'b) event_listener -> 'a -> 'b -> bool t
237244
(** Invoke an existing handler. Useful to chain event handlers. *)
238245

lib/dom_html.mli

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1238,12 +1238,16 @@ end
12381238

12391239
val no_handler : ('a, 'b) event_listener
12401240
(** see [Dom.no_handler] *)
1241+
12411242
val handler : ((#event t as 'b) -> bool t) -> ('a, 'b) event_listener
12421243
(** see [Dom.handler] *)
1244+
12431245
val full_handler : ('a -> (#event t as 'b) -> bool t) -> ('a, 'b) event_listener
12441246
(** see [Dom.full_handler] *)
1247+
12451248
val invoke_handler : ('a, 'b) event_listener -> 'a -> 'b -> bool t
12461249
(** see [Dom.invoke_handler] *)
1250+
12471251
val eventTarget : #event t -> element t
12481252
(** see [Dom.eventTarget] *)
12491253

@@ -1340,8 +1344,10 @@ val buttonPressed : #mouseEvent Js.t -> mouse_button
13401344

13411345
val eventAbsolutePosition : #mouseEvent t -> int * int
13421346
(** Returns the absolute position of the mouse pointer. *)
1347+
13431348
val elementClientPosition : #element t -> int * int
13441349
(** Position of an element relative to the viewport *)
1350+
13451351
val getDocumentScroll : unit -> int * int
13461352
(** Viewport top/left position *)
13471353

@@ -1609,6 +1615,7 @@ module CoerceTo : sig
16091615
end
16101616

16111617
type timeout_id_safe
1618+
16121619
(** Same as [Dom_html.window##setTimeout(cb,ms)] but prevents overflow
16131620
with delay greater than 24 days. *)
16141621
val setTimeout : (unit -> unit) -> float -> timeout_id_safe

lib/graphics/graphics_js.mli

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,10 @@ val open_graph : string -> unit
3737

3838
val open_canvas : Dom_html.canvasElement Js.t -> unit
3939
(** use a canvas to setup the current context *)
40+
4041
val get_context : unit -> context
4142
(** Get the current context *)
43+
4244
val set_context : context -> unit
4345
(** Set the current context *)
4446

0 commit comments

Comments
 (0)