We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0906080 commit 2bd91edCopy full SHA for 2bd91ed
Sources/JavaScriptKit/JSObject.swift
@@ -7,6 +7,14 @@ public class JSObjectRef: Equatable {
7
self.id = id
8
}
9
10
+ @_disfavoredOverload
11
+ public subscript(_ name: String) -> ((JSValueEncodable...) -> JSValue)? {
12
+ guard let function = self[name].function else { return nil }
13
+ return { (arguments: JSValueEncodable...) in
14
+ function(this: self, args: arguments)
15
+ }
16
17
+
18
@_disfavoredOverload
19
public subscript(dynamicMember name: String) -> ((JSValueEncodable...) -> JSValue)? {
20
guard let function = self[name].function else { return nil }
0 commit comments