Resolve promise inside of setCOSJSTargetFunction on NSAlert is stuck
When trying to resolve a promise inside of a `setCOSJSTargetFunction` which is set on a `NSAlert`, the process seems to be blocked by the `NSAlert` being opened. Is there a way to asynchronously open a `NSAlert`, so that the promises can be resolved while the `NSAlert` is opened? Maybe using `DispatchQueue.main.async` in some way?