I am having trouble understanding how these three are related. Is it the case that:
-
JS/joo_global_object == OCaml/Jv.global
Intuition: These two lines seem to match up:
jsoo-code-mirror/includes.js at bd1d3c68a23655cd667986aef48c05a6514fd194 · patricoferris/jsoo-code-mirror · GitHub
jsoo-code-mirror/stream.ml at bd1d3c68a23655cd667986aef48c05a6514fd194 · patricoferris/jsoo-code-mirror · GitHub
which would imply that JS/joo_global_object == OCaml/Jv.global
-
JS/ == Js.Unsafe.global ?
The intuition here is from How to bind a JS library for OCaml , where the
Js.Unsafe.global##.document
would seem to imply that Js.Unsafe.global is the “highest root-ish global”
- Does this mean that Jv.global == Js.Unsafe.global##joo_global_object ?
This follows from 1 & 2, but looks weird.
hhugo
2
Jv.global == Js.Unsafe.global
They are both defined to be equal to the js variable globalThis
.
joo_global_object
is an old deprecated name for globalThis
.
1 Like