Skip to content

Commit d2e7b5c

Browse files
committed
Doc: ws
1 parent 8d5acbf commit d2e7b5c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

manual/bindings.wiki

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
= How to bind a JS library for OCaml
22

3-
==Accessing a JS variable, ex: {{{document}}}:
3+
== Accessing a JS variable, ex: {{{document}}}:
44
Write in .ml:
55

66
<<code language="ocaml"|
@@ -21,7 +21,7 @@ Be careful the function <<a_api subproject="js_of_ocaml"|val Js_of_ocaml.Js.Unsa
2121
and the value <<a_api subproject="js_of_ocaml"|val Js_of_ocaml.Js.Unsafe.global>> are not typed.
2222
Verify the library documentation before writing the type.
2323

24-
==Binding a JS function
24+
== Binding a JS function
2525

2626
Example from the Js module:
2727
<<code language="ocaml"|
@@ -31,7 +31,7 @@ let decodeURI (s : js_string t) : js_string t =
3131

3232
Have a look at the <<a_api subproject="js_of_ocaml"|module Js_of_ocaml.Js.Unsafe>> module API.
3333

34-
==Using a JS constructor, ex: {{{F}}}:
34+
== Using a JS constructor, ex: {{{F}}}:
3535
Write in .ml:
3636

3737
<<code language="ocaml"|
@@ -50,7 +50,7 @@ val f_fromString : (js_string t -> ... Js.t) Js.constr
5050
val f_blah : (#Dom_html.element t -> js_string t -> ... Js.t) Js.constr
5151
>>
5252

53-
==Accessing or modifying a JS property to an element
53+
== Accessing or modifying a JS property to an element
5454

5555
When a property is missing in the OCaml interface of an element (for example
5656
it has been dynamically added by a library), you can access using unsafe
@@ -70,7 +70,7 @@ Here, {{{v}}} may be a JS value or an OCaml value.
7070
If you want to do that in type safe manner, just define new types for the
7171
extended elements, or wrap the unsafe functions inside a getter and setter.
7272

73-
== Binding a JS object ==
73+
== Binding a JS object
7474

7575
Write in .ml and in .mli:
7676

@@ -107,7 +107,7 @@ class type my_js_type = object
107107
end
108108
>>
109109

110-
===Example binding some constants:
110+
=== Example binding some constants:
111111

112112
For example if the JS class is used to define three constants {{{thelib.Theclass.VALUEA}}}, {{{thelib.Theclass.VALUEB}}}, {{{thelib.Theclass.VALUEC}}},
113113

@@ -137,7 +137,7 @@ and in .mli:
137137
val theclass : theclass t
138138
>>
139139

140-
==Constructing JS objects manually
140+
== Constructing JS objects manually
141141
If you want to construct a JS object manually
142142
(without calling a function or a constructor), you can use
143143
the <<a_manual chapter="Ppx"|Ppx>> syntax extension.

0 commit comments

Comments
 (0)