File tree 1 file changed +6
-6
lines changed
Sources/JavaScriptKit/FundamentalObjects
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -90,27 +90,27 @@ public class JSClosure: JSOneshotClosure {
90
90
91
91
// MARK: - `JSClosure` mechanism note
92
92
//
93
- // 1. Create thunk function in JavaScript world, that has a reference
94
- // to Swift Closure .
93
+ // 1. Create a thunk in the JavaScript world, which has a reference
94
+ // to a Swift closure .
95
95
// ┌─────────────────────┬──────────────────────────┐
96
96
// │ Swift side │ JavaScript side │
97
97
// │ │ │
98
98
// │ │ │
99
- // │ │ ┌──[Thunk function] ──┐ │
99
+ // │ │ ┌────── [Thunk]───── ──┐ │
100
100
// │ ┌ ─ ─ ─ ─ ─│─ ─│─ ─ ─ ─ ─ ┐ │ │
101
101
// │ ↓ │ │ │ │ │
102
102
// │ [Swift Closure] │ │ Host Function ID │ │
103
103
// │ │ │ │ │
104
104
// │ │ └────────────────────┘ │
105
105
// └─────────────────────┴──────────────────────────┘
106
106
//
107
- // 2. When thunk function is invoked, it calls Swift Closure via
108
- // `_call_host_function` and callback the result through callback func
107
+ // 2. When the thunk function is invoked, it calls the Swift closure via
108
+ // `_call_host_function` and receives the result through a callback.
109
109
// ┌─────────────────────┬──────────────────────────┐
110
110
// │ Swift side │ JavaScript side │
111
111
// │ │ │
112
112
// │ │ │
113
- // │ Apply ┌──[Thunk function] ──┐ │
113
+ // │ Apply ┌────── [Thunk]───── ──┐ │
114
114
// │ ┌ ─ ─ ─ ─ ─│─ ─│─ ─ ─ ─ ─ ┐ │ │
115
115
// │ ↓ │ │ │ │ │
116
116
// │ [Swift Closure] │ │ Host Function ID │ │
You can’t perform that action at this time.
0 commit comments