JavaScriptKit
JavaScriptKit copied to clipboard
Swift framework to interact with JavaScript through WebAssembly.
During development of an animated webassembly feature a function that takes and returns a large typed array started failing occasionally with an error similar to: > The JSClosure has been...
I am trying to figure out how to use `JSObject.global.fetch.function!` along with `JSPromise` to assemble a PUT request with a body and headers. I keep falling flat on my face...
Rust folks have a similar issue, where `long long` shouldn't be mapped to `Int64`, which is bridged to `BigInt` on JS side. https://github.com/rustwasm/wasm-bindgen/issues/800 Checked a few other places where `long...
I'm proposing to declare `Runtime/lib` directory as SwiftPM resource as described in [SE-0271](https://github.com/apple/swift-evolution/blob/main/proposals/0271-package-manager-resources.md). With a few adjustments to `carton`, this will allow us to separate `carton` entrypoint files from JSKit...
I have this really simple problem I can't seem to figure out. I'm trying to use `JavaScriptKit` to create an element in the browsers DOM and set some CSS style...
I am trying to open a WebSocket in JavaScriptKit. I have found a related issue on this, but the implementation did not work for me. I currently have `let socket...
I've followed the basic docs to call an exported function that takes in string/numbers and returns string/numbers but I'm struggling to figure out how to get the JS runtime to...
Do I understand correctly that there's no easy way right now to convert an arbitrary `Encodable` type to `JSValue`? We already have `JSValueDecoder`, but apparently lack the opposite for `Encodable`...
Title says it. Code: ``` import Foundation import JavaScriptKit print("Before sleep()") sleep(1000) // wasm bails out print("After sleep()") // Never happens ``` Project for the above code: https://github.com/ShonFrazier/swiftwasmsleep The full...