Skip to content

Commit 320282f

Browse files
Merge pull request #214 from swiftwasm/katei/expose-hook-points
Expose `JavaScriptEventLoop.queueMicrotask` and `.setTimeout`
2 parents a549f58 + d0f49ad commit 320282f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/JavaScriptEventLoop/JavaScriptEventLoop.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ public final class JavaScriptEventLoop: SerialExecutor, @unchecked Sendable {
3939

4040
/// A function that queues a given closure as a microtask into JavaScript event loop.
4141
/// See also: https://developer.mozilla.org/en-US/docs/Web/API/HTML_DOM_API/Microtask_guide
42-
let queueMicrotask: @Sendable (@escaping () -> Void) -> Void
42+
public var queueMicrotask: @Sendable (@escaping () -> Void) -> Void
4343
/// A function that invokes a given closure after a specified number of milliseconds.
44-
let setTimeout: @Sendable (Double, @escaping () -> Void) -> Void
44+
public var setTimeout: @Sendable (Double, @escaping () -> Void) -> Void
4545

4646
/// A mutable state to manage internal job queue
4747
/// Note that this should be guarded atomically when supporting multi-threaded environment.

0 commit comments

Comments
 (0)