File: ECMASCRIPT.md

package info (click to toggle)
js-of-ocaml 6.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 37,932 kB
  • sloc: ml: 135,957; javascript: 58,364; ansic: 437; makefile: 422; sh: 12; perl: 4
file content (154 lines) | stat: -rw-r--r-- 4,755 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
# ECMAScript and Node requirements

The goal of the document is to list features we rely on for the runtime and the generated code.
Features are grouped by ECMAScript version.

## ECMAScript 2015

### Arrow function expressions

- [Compatibility](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions#browser_compatibility)
- For Wasm_of_ocaml

### Classes

- [Compatibility](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes#browser_compatibility)

### const

- [Compatibility](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const#browser_compatibility)

### for...of

- [Compatibility](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of#browser_compatibility)

### let

- [Compatibility](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let#browser_compatibility)

### Map

- [Compatibility](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#browser_compatibility)
- Used in runtime for data structures and object tracking

### Object.assign

- [Compatibility](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign#browser_compatibility)

### Rest parameters

- [Compatibility](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters#browser_compatibility)

### Set

- [Compatibility](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set#browser_compatibility)

### Spread syntax (in function call)

- [Compatibility](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax#browser_compatibility)

### TypedArray

- [Compatibility](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#browser_compatibility)
- To implement bigarray

### WeakMap

- [Compatibility](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap#browser_compatibility)

### DataView

- [Compatibility](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView#browser_compatibility)

## ECMAScript 2016

### async function

- [Compatibility](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function#browser_compatibility)
- For Wasm_of_ocaml

### await

- [Compatibility](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await#browser_compatibility)
- For Wasm_of_ocaml

## ECMAScript 2020

### BigInt

- [Compatibility](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt#browser_compatibility)
- For Wasm_of_ocaml

### globalThis

- [Compatibility](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis#browser_compatibility)
- Polyfilled in the repository

### Optional chaining (?.)

- [Compatibility](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining#browser_compatibility)

## ECMAScript 2021

### FinalizationRegistry

- [Compatibility](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry#browser_compatibility)
- Optional for js_of_ocaml

### WeakRef

- [Compatibility](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakRef#browser_compatibility)
- To implement weak and ephemeron
- Optional

## Web APIs

### Canvas API

- [Compatibility](https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API#browser_compatibility)

### Crypto API

- [Compatibility](https://developer.mozilla.org/en-US/docs/Web/API/Crypto#browser_compatibility)

### Document API

- [Compatibility](https://developer.mozilla.org/en-US/docs/Web/API/Document#browser_compatibility)

### Image API

- [Compatibility](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement#browser_compatibility)

### Performance API

- [Compatibility](https://developer.mozilla.org/en-US/docs/Web/API/Performance#browser_compatibility)

### XMLHttpRequest

- [Compatibility](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest#browser_compatibility)

## Node.js

### Built-in modules with `node:` prefix

- [Compatibility](https://nodejs.org/docs/latest/api/modules.html#built-in-modules)

### Child process

- [Compatibility](https://nodejs.org/docs/latest/api/child_process.html)

### File system

- [Compatibility](https://nodejs.org/docs/latest/api/fs.html)

### Process

- [Compatibility](https://nodejs.org/docs/latest/api/process.html)

### TTY

- [Compatibility](https://nodejs.org/docs/latest/api/tty.html)

### Util

- [Compatibility](https://nodejs.org/docs/latest/api/util.html)