@@ -13,7 +13,6 @@
14module Language.Javascript.JSaddle.Run.Files (
14module Language.Javascript.JSaddle.Run.Files (
17 , initState
16 , initState
18 , runBatch
17 , runBatch
19 , ghcjsHelpers
18 , ghcjsHelpers
@@ -337,41 +336,6 @@ runBatch send sendSync = "\
337 \ runBatch(batch);\n\
336 \ runBatch(batch);\n\
340−-- Use this to generate this string for embedding
341−-- sed -e 's|\\|\\\\|g' -e 's|^| \\|' -e 's|$|\\n\\|' -e 's|"|\\"|g' data/jsaddle.js | pbcopy
342−jsaddleJs :: ByteString
344− \if(typeof global !== \"undefined\") {\n\
345− \ global.window = global;\n\
346− \ global.WebSocket = require('ws');\n\
349− \var connect = function() {\n\
350− \ var wsaddress =\n\
351− \ typeof window.location === \"undefined\"\n\
352− \ ? \"ws://localhost:3709/\"\n\
353− \ : window.location.protocol.replace('http', 'ws')+\"//\"+window.location.hostname+(window.location.port?(\":\"+window.location.port):\"\");\n\
355− \ var ws = new WebSocket(wsaddress);\n\
357− \ ws.onopen = function(e) {\n\
358− \ " <> initState <> "\
360− \ ws.onmessage = function(e) {\n\
361− \ var batch = JSON.parse(e.data);\n\
363− \ " <> runBatch (\a -> "ws.send(JSON.stringify(" <> a <> "));") Nothing <> "\
366− \ ws.onerror = function() {\n\
367− \ setTimeout(connect, 1000);\n\
371− \ " <> ghcjsHelpers <> "\
375ghcjsHelpers :: ByteString
339ghcjsHelpers :: ByteString
376ghcjsHelpers = "\
340ghcjsHelpers = "\
377 \function h$isNumber(o) {\
341 \function h$isNumber(o) {\