Skip to content

Commit ae7eded

Browse files
jimtchenglou
authored andcommitted
Fix external bs.scope example. (#49)
1 parent 9305a29 commit ae7eded

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/bind-to-global-values.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,13 @@ let someNumber = random();
8989
you can bind to an arbitrarily deep object by passing a tuple to `bs.scope`:
9090

9191
```ocaml
92-
external length: int = "length" [@@bs.val][@@bs.scope "window", "ancestorOrigins", "ancestorOrigins"]
92+
external length: int = "length" [@@bs.val][@@bs.scope "window", "location", "ancestorOrigins"]
9393
```
9494

9595
Reason syntax:
9696

9797
```reason
98-
[@bs.val] [@bs.scope ("window", "ancestorOrigins", "ancestorOrigins")] external length : int = "length";
98+
[@bs.val] [@bs.scope ("window", "location", "ancestorOrigins")] external length : int = "length";
9999
```
100100

101101
This binds to `window.location.ancestorOrigins.length`.

0 commit comments

Comments
 (0)