Skip to content

Commit

Permalink
Lib: Add other textMetrics property (ocsigen#1784)
Browse files Browse the repository at this point in the history
  • Loading branch information
illusory0x0 authored Jan 6, 2025
1 parent 3d1286a commit 6aebdf5
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
and direct style, resulting in better performance when
no effect handler is installed
* Compiler/Runtime: Make resuming a continuation more efficient in js (#1765)
* Lib: Add other textMetrics property (#1784)

## Bug fixes
* Fix small bug in global data flow analysis (#1768)
Expand Down
28 changes: 28 additions & 0 deletions lib/js_of_ocaml/dom_html.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1998,7 +1998,35 @@ and canvasGradient = object
end

and textMetrics = object
method actualBoundingBoxAscent : number_t readonly_prop
(** https://developer.mozilla.org/docs/Web/API/TextMetrics/actualBoundingBoxAscent *)

method actualBoundingBoxDescent : number_t readonly_prop
(** https://developer.mozilla.org/docs/Web/API/TextMetrics/actualBoundingBoxDescent *)

method actualBoundingBoxLeft : number_t readonly_prop
(** https://developer.mozilla.org/docs/Web/API/TextMetrics/actualBoundingBoxLeft *)

method actualBoundingBoxRight : number_t readonly_prop
(** https://developer.mozilla.org/docs/Web/API/TextMetrics/actualBoundingBoxRight *)

method alphabeticBaseline : number_t readonly_prop
(** https://developer.mozilla.org/docs/Web/API/TextMetrics/alphabeticBaseline *)

method fontBoundingBoxAscent : number_t readonly_prop
(** https://developer.mozilla.org/docs/Web/API/TextMetrics/fontBoundingBoxAscent *)

method fontBoundingBoxDescent : number_t readonly_prop
(** https://developer.mozilla.org/docs/Web/API/TextMetrics/fontBoundingBoxDescent *)

method hangingBaseline : number_t readonly_prop
(** https://developer.mozilla.org/docs/Web/API/TextMetrics/hangingBaseline *)

method ideographicBaseline : number_t readonly_prop
(** https://developer.mozilla.org/docs/Web/API/TextMetrics/ideographicBaseline *)

method width : number_t readonly_prop
(** https://developer.mozilla.org/docs/Web/API/TextMetrics/width *)
end

and imageData = object
Expand Down
28 changes: 28 additions & 0 deletions lib/js_of_ocaml/dom_html.mli
Original file line number Diff line number Diff line change
Expand Up @@ -1809,7 +1809,35 @@ and canvasGradient = object
end

and textMetrics = object
method actualBoundingBoxAscent : number_t readonly_prop
(** https://developer.mozilla.org/docs/Web/API/TextMetrics/actualBoundingBoxAscent *)

method actualBoundingBoxDescent : number_t readonly_prop
(** https://developer.mozilla.org/docs/Web/API/TextMetrics/actualBoundingBoxDescent *)

method actualBoundingBoxLeft : number_t readonly_prop
(** https://developer.mozilla.org/docs/Web/API/TextMetrics/actualBoundingBoxLeft *)

method actualBoundingBoxRight : number_t readonly_prop
(** https://developer.mozilla.org/docs/Web/API/TextMetrics/actualBoundingBoxRight *)

method alphabeticBaseline : number_t readonly_prop
(** https://developer.mozilla.org/docs/Web/API/TextMetrics/alphabeticBaseline *)

method fontBoundingBoxAscent : number_t readonly_prop
(** https://developer.mozilla.org/docs/Web/API/TextMetrics/fontBoundingBoxAscent *)

method fontBoundingBoxDescent : number_t readonly_prop
(** https://developer.mozilla.org/docs/Web/API/TextMetrics/fontBoundingBoxDescent *)

method hangingBaseline : number_t readonly_prop
(** https://developer.mozilla.org/docs/Web/API/TextMetrics/hangingBaseline *)

method ideographicBaseline : number_t readonly_prop
(** https://developer.mozilla.org/docs/Web/API/TextMetrics/ideographicBaseline *)

method width : number_t readonly_prop
(** https://developer.mozilla.org/docs/Web/API/TextMetrics/width *)
end

and imageData = object
Expand Down

0 comments on commit 6aebdf5

Please sign in to comment.