summaryrefslogtreecommitdiff
path: root/src/JavaScript.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/JavaScript.hs')
-rw-r--r--src/JavaScript.hs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/JavaScript.hs b/src/JavaScript.hs
index 6c07370..aaf3747 100644
--- a/src/JavaScript.hs
+++ b/src/JavaScript.hs
@@ -6,6 +6,8 @@ module JavaScript (
toJSVal,
consoleLog,
consoleLogVal,
+
+ historyPushState,
) where
import JavaScript.Element
@@ -21,3 +23,9 @@ foreign import javascript unsafe "console.log($1)"
foreign import javascript unsafe "console.log($1)"
consoleLogVal :: JSVal -> IO ()
+
+
+historyPushState :: String -> IO ()
+historyPushState = js_history_pushState . toJSString
+foreign import javascript unsafe "history.pushState(null, '', $1)"
+ js_history_pushState :: JSString -> IO ()