@@ -71,15 +71,15 @@ a few additional steps though (you can skip these steps if your app depends on
71
71
)
72
72
```
73
73
74
- 2 . Add an explicit import in the code that executes ** before* you start using ` await ` and/or ` Task `
75
- APIs (most likely in ` main.swift ` ):
74
+ 1 . Add an explicit import in the code that executes ** before* * you start using ` await ` and/or ` Task `
75
+ APIs (most likely in ` main.swift ` ):
76
76
77
77
``` swift
78
78
import JavaScriptEventLoop
79
79
```
80
80
81
- 3 . Run this function ** before* you start using ` await ` and/or ` Task ` APIs (again, most likely in
82
- ` main.swift ` ):
81
+ 3 . Run this function ** before** you start using ` await ` and/or ` Task ` APIs (again, most likely in
82
+ ` main.swift ` ):
83
83
84
84
``` swift
85
85
JavaScriptEventLoop.installGlobalExecutor ()
@@ -125,21 +125,21 @@ asyncButtonElement.onclick = .object(JSClosure { _ in
125
125
_ = document.body .appendChild (asyncButtonElement)
126
126
```
127
127
128
- ## Requirements
128
+ ## Requirements
129
129
130
130
### For developers
131
131
132
- - macOS 11 and Xcode 13.2 or later versions, which support Swift Concurrency back-deployment.
133
- To use earlier versions of Xcode on macOS 11 you'll have to
134
- add ` .unsafeFlags(["-Xfrontend", "-disable-availability-checking"]) ` in ` Package.swift ` manifest of
135
- your package that depends on JavaScriptKit. You can also use Xcode 13.0 and 13.1 on macOS Monterey,
136
- since this OS does not need back-deployment.
132
+ - macOS 11 and Xcode 13.2 or later versions, which support Swift Concurrency back-deployment.
133
+ To use earlier versions of Xcode on macOS 11 you'll have to
134
+ add ` .unsafeFlags(["-Xfrontend", "-disable-availability-checking"]) ` in ` Package.swift ` manifest of
135
+ your package that depends on JavaScriptKit. You can also use Xcode 13.0 and 13.1 on macOS Monterey,
136
+ since this OS does not need back-deployment.
137
137
- [ Swift 5.5 or later] ( https://swift.org/download/ ) and Ubuntu 18.04 if you'd like to use Linux.
138
138
Other Linux distributions are currently not supported.
139
139
140
140
### For users of apps depending on JavaScriptKit
141
141
142
- Any recent browser that [ supports WebAssembly] ( https://caniuse.com/#feat=wasm ) and required
142
+ Any recent browser that [ supports WebAssembly] ( https://caniuse.com/#feat=wasm ) and required
143
143
JavaScript features should work, which currently includes:
144
144
145
145
- Edge 84+
@@ -149,7 +149,7 @@ JavaScript features should work, which currently includes:
149
149
- Mobile Safari 14.8+
150
150
151
151
If you need to support older browser versions, you'll have to build with
152
- ` JAVASCRIPTKIT_WITHOUT_WEAKREFS ` flag , passing ` -Xswiftc -DJAVASCRIPTKIT_WITHOUT_WEAKREFS ` flags
152
+ ` JAVASCRIPTKIT_WITHOUT_WEAKREFS ` and ` JAVASCRIPTKIT_WITHOUT_BIGINTS ` flags , passing ` -Xswiftc -DJAVASCRIPTKIT_WITHOUT_WEAKREFS -Xswiftc -DJAVASCRIPTKIT_WITHOUT_BIGINTS ` flags
153
153
when compiling. This should lower browser requirements to these versions:
154
154
155
155
- Edge 16+
0 commit comments