Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: swiftwasm/JavaScriptKit
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.49.0
Choose a base ref
...
head repository: swiftwasm/JavaScriptKit
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0.50.0
Choose a head ref
  • 1 commit
  • 11 files changed
  • 1 contributor

Commits on Apr 2, 2026

  1. Add JSRemote<JSObject> (#711)

    Add `JSRemote<JSObject>` API for accessing JSObjects without transfer
    
    The new API allows creating a handle for a `JSObject` that remains
    on its original JavaScript thread and hopping back to that thread
    to access the object when needed. This is useful for cases where the
    object cannot be transferred to another thread, but occasional access
    is still required or when we want to guarantee that an object is always
    accessed on the same thread for safety (it should be statically
    guaranteed with strict Sendable checking, but modules with language mode
    5 don't have that).
    
    Example:
    
    ```swift
    let document = JSObject.global.document.object!
    let remoteDocument = JSRemote(document)
    
    let executor = try await WebWorkerTaskExecutor(numberOfThreads: 1)
    let title = try await Task(executorPreference: executor) {
        try await remoteDocument.withJSObject { document in
            document.title.string ?? ""
        }
    }.value
    ```
    kateinoigakukun authored Apr 2, 2026
    Configuration menu
    Copy the full SHA
    df32a66 View commit details
    Browse the repository at this point in the history
Loading