Skip to content

Commit c19f461

Browse files
committed
Update JSTypedArray.swift
1 parent 76ed2c5 commit c19f461

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Sources/JavaScriptKit/BasicObjects/JSTypedArray.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ public class JSTypedArray<Element>: JSValueConvertible, ExpressibleByArrayLitera
3939
self.init(unsafe: jsObject)
4040
}
4141

42+
public init(wrapping jsObject: JSObjectRef) {
43+
_retain(jsObject.id)
44+
super.init(id: jsObject.id)
45+
}
46+
4247
required public convenience init(arrayLiteral elements: Element...) {
4348
self.init(elements)
4449
}

0 commit comments

Comments
 (0)