summaryrefslogtreecommitdiff
path: root/Miso
diff options
context:
space:
mode:
Diffstat (limited to 'Miso')
-rw-r--r--Miso/Extend.hs28
-rw-r--r--Miso/FFI/Audio.hs21
-rw-r--r--Miso/FFI/Document.hs12
-rw-r--r--Miso/FFI/Fullscreen.hs29
4 files changed, 0 insertions, 90 deletions
diff --git a/Miso/Extend.hs b/Miso/Extend.hs
deleted file mode 100644
index 9ebdd08..0000000
--- a/Miso/Extend.hs
+++ /dev/null
@@ -1,28 +0,0 @@
-{-# LANGUAGE OverloadedStrings #-}
-{-# LANGUAGE NoImplicitPrelude #-}
-
-module Miso.Extend
- ( crossorigin_,
- onPreventClick,
- )
-where
-
-import Alpha
-import Miso
-import Miso.String
-
--- | HTML crossorigin attribute
---
--- https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/crossorigin
-crossorigin_ :: MisoString -> Attribute action
-crossorigin_ = textProp "crossorigin"
-
--- | Like 'onClick' but prevents the default action from triggering. Use this to
--- overide 'a_' links, for example.
-onPreventClick :: action -> Attribute action
-onPreventClick action =
- onWithOptions
- Miso.defaultOptions {preventDefault = True}
- "click"
- emptyDecoder
- (\() -> action)
diff --git a/Miso/FFI/Audio.hs b/Miso/FFI/Audio.hs
deleted file mode 100644
index b34960b..0000000
--- a/Miso/FFI/Audio.hs
+++ /dev/null
@@ -1,21 +0,0 @@
-{-# LANGUAGE NoImplicitPrelude #-}
-
-module Miso.FFI.Audio where
-
-import GHCJS.Types
-import Protolude
-
-{-
-Usage:
-
-obj <- Miso.FFI.Document.getElementById "myAudioPlayer"
-play obj
-pause obj
-
--}
-
-foreign import javascript unsafe "$1.play();"
- play :: JSVal -> IO ()
-
-foreign import javascript unsafe "$1.pause();"
- pause :: JSVal -> IO ()
diff --git a/Miso/FFI/Document.hs b/Miso/FFI/Document.hs
deleted file mode 100644
index b4fe44f..0000000
--- a/Miso/FFI/Document.hs
+++ /dev/null
@@ -1,12 +0,0 @@
-{-# LANGUAGE NoImplicitPrelude #-}
-
-module Miso.FFI.Document where
-
-import GHCJS.Types
-import Protolude
-
-foreign import javascript unsafe "$r = document.getElementById($1);"
- getElementById :: JSString -> IO JSVal
-
-foreign import javascript unsafe "$r = document.querySelector($1);"
- querySelector :: JSString -> IO JSVal
diff --git a/Miso/FFI/Fullscreen.hs b/Miso/FFI/Fullscreen.hs
deleted file mode 100644
index 4e70da6..0000000
--- a/Miso/FFI/Fullscreen.hs
+++ /dev/null
@@ -1,29 +0,0 @@
-{-# LANGUAGE NoImplicitPrelude #-}
-
-module Miso.FFI.Fullscreen where
-
-import GHCJS.Types
-import Protolude
-
--- | Requests that the user agent switch from full-screen mode back to windowed
--- mode. Returns a Promise which is resolved once full-screen mode has been
--- completely shut off.
---
--- https://developer.mozilla.org/en-US/docs/Web/API/Document/exitFullscreen
-foreign import javascript unsafe "$r = document.exitFullscreen();"
- exitFullscreen :: IO JSVal
-
-exit :: IO JSVal
-exit = exitFullscreen
-
--- | Asks the user agent to place the specified element (and, by extension, its
--- descendants) into full-screen mode, removing all of the browser's UI elements
--- as well as all other applications from the screen. Returns a Promise which is
--- resolved once full-screen mode has been activated.
---
--- https://developer.mozilla.org/en-US/docs/Web/API/Element/requestFullscreen
-foreign import javascript unsafe "$r = $1.requestFullscreen();"
- requestFullscreen :: JSVal -> IO JSVal
-
-request :: JSVal -> IO JSVal
-request = requestFullscreen