diff options
| author | Roman Smrž <roman.smrz@seznam.cz> | 2026-07-04 17:22:11 +0200 |
|---|---|---|
| committer | Roman Smrž <roman.smrz@seznam.cz> | 2026-07-04 17:28:37 +0200 |
| commit | 9686f788eab5690edad7a6b692aa2a926cddc8b8 (patch) | |
| tree | e63eabc080d54fafcb7a13440db3081362256dee /src/JavaScript.hs | |
| parent | f5924e9e01071b1616d42bf1fa62716d37c59ecf (diff) | |
Diffstat (limited to 'src/JavaScript.hs')
| -rw-r--r-- | src/JavaScript.hs | 8 |
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 () |