How to use the Synchronous Clipboard API without native code?

In 0.19 the scheduling of ports will change so that you can run functions that need to be in the same call stack as a user event handler. See: Window.confirm without native code?