We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JSUInt8ClampedArray
[UInt8]
console.log(data: "arr transformed") let array: [UInt8] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] let jsArray: Uint8ClampedArray = .init(array) console.log(data: "newData created") let newImage = ImageData(data: .init(arr), sw: 600) console.log(data: "image created") context.putImageData(imagedata: newImage, dx: 0, dy: 0)
besides, I'm using WebAPIKit. let jsArray: Uint8ClampedArray = .init(array) function crashed.
let jsArray: Uint8ClampedArray = .init(array)
import JavaScriptKit public enum console { public static func log(data: JSValue...) { let this = JSObject.global["console"].object! _ = this["log"].function!(this: this, arguments: data.map{$0.jsValue} ) } } let document = JSObject.global.document struct Button { var object: JSValue init(_ title: String, onClick block: @escaping () -> Void = {}) { self.object = JSObject.global.document.createElement("button") object.textContent = .init(stringLiteral: title) let callBackClosure = JSClosure { _ in block() return nil } object.onclick = .object(callBackClosure) } } let button = Button("Button") { console.log(data: "creating array") let array: [UInt8] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] console.log(data: array.jsValue) let jsUInt8ClampedArray: JSUInt8ClampedArray = .init(array) console.log(data: jsUInt8ClampedArray.jsValue) } _ = document.body.appendChild(button.object)
carton dev
click the button, and it seems crashes in JS Runtime.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
besides, I'm using WebAPIKit.

let jsArray: Uint8ClampedArray = .init(array)
function crashed.reproduce the situation
click the button, and it seems crashes in JS Runtime.

The text was updated successfully, but these errors were encountered: