ghcjs-dom-javascript-0.10.0.0: src/GHCJS/DOM/JSFFI/Generated/TextDecoderCommon.hs
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ForeignFunctionInterface, JavaScriptFFI #-}
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- | Generated by dom-gen from encoding (webref). Do not edit.
module GHCJS.DOM.JSFFI.Generated.TextDecoderCommon
(js_getEncoding, js_getFatal, js_getIgnoreBOM, getEncoding, getFatal, getIgnoreBOM, TextDecoderCommon(..), gTypeTextDecoderCommon, IsTextDecoderCommon, toTextDecoderCommon)
where
import Prelude ((.), (==), (>>=), (<$>), (++), Bool(..), Maybe(..), IO, Int, Word, Double, Float)
import qualified Prelude as P
import Control.Monad (void)
import GHCJS.Types (JSVal, JSString)
import GHCJS.Foreign (jsUndefined, jsNull)
import GHCJS.DOM.Types
import qualified GHCJS.DOM.Types as Types
import GHCJS.DOM.EventTargetClosures (EventName, unsafeEventName, unsafeEventNameAsync)
import GHCJS.DOM.JSFFI.Generated.Enums
foreign import javascript unsafe "(($1) => { return $1[\"encoding\"]; })"
js_getEncoding :: TextDecoderCommon -> IO JSString
-- | <https://developer.mozilla.org/docs/Web/API/TextDecoder/encoding MDN TextDecoderCommon.encoding documentation>
getEncoding :: (MonadDOM m, IsTextDecoderCommon self, FromJSString result) => self -> m result
getEncoding self = liftDOM ((fromJSString <$> (js_getEncoding ((Types.toTextDecoderCommon self)))))
foreign import javascript unsafe "(($1) => { return $1[\"fatal\"]; })"
js_getFatal :: TextDecoderCommon -> IO Bool
-- | <https://developer.mozilla.org/docs/Web/API/TextDecoder/fatal MDN TextDecoderCommon.fatal documentation>
getFatal :: (MonadDOM m, IsTextDecoderCommon self) => self -> m Bool
getFatal self = liftDOM ((js_getFatal ((Types.toTextDecoderCommon self))))
foreign import javascript unsafe "(($1) => { return $1[\"ignoreBOM\"]; })"
js_getIgnoreBOM :: TextDecoderCommon -> IO Bool
-- | <https://developer.mozilla.org/docs/Web/API/TextDecoder/ignoreBOM MDN TextDecoderCommon.ignoreBOM documentation>
getIgnoreBOM :: (MonadDOM m, IsTextDecoderCommon self) => self -> m Bool
getIgnoreBOM self = liftDOM ((js_getIgnoreBOM ((Types.toTextDecoderCommon self))))