@@ -48,13 +48,14 @@ import GI.WebKit.Objects.WebFrame
4848 (webFrameGetGlobalContext)
4949import GI.GLib (idleAdd)
5050import GI.GLib.Constants(pattern PRIORITY_DEFAULT)
51−#endif
52−import qualified Control.Exception as E (Exception, catch, bracket)
53−import Control.Concurrent.MVar (takeMVar, putMVar, newEmptyMVar)
5451import Foreign.Ptr (castPtr)
5552import GI.JavaScriptCore.Structs.GlobalContext (GlobalContext(..))
5653import Foreign.ForeignPtr (withForeignPtr)
54+#endif
55+import qualified Control.Exception as E (Exception, catch, bracket)
56+import Control.Concurrent.MVar (takeMVar, putMVar, newEmptyMVar)
5757
58+#ifndef ghcjs_HOST_OS
5859-- | Post an action to be run in the main GUI thread.
5960--
6061-- The current thread blocks until the action completes and the result is
@@ -75,6 +76,7 @@ postGUIAsync :: IO () -> IO ()
7576postGUIAsync action = do
7677 idleAdd PRIORITY_DEFAULT $ action >> return False
7778 return ()
79+#endif
7880
7981-- | Wrapped version of 'E.catch' that runs in a MonadIO that works
8082-- a bit better with 'JSM'