jsaddle-dom-0.10.0.0: src/JSDOM/Generated/TextDecoderCommon.hs
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- | Generated by dom-gen from encoding (webref). Do not edit.
module JSDOM.Generated.TextDecoderCommon
(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 Control.Lens.Operators ((^.))
import Language.Javascript.JSaddle (JSM, JSVal, JSString, toJSVal, valToBool, valToNumber, js, jss, jsf, jsg, new, function, asyncFunction, jsUndefined, jsNull)
import JSDOM.Types
import qualified JSDOM.Types as Types
import JSDOM.EventTargetClosures (EventName, unsafeEventName, unsafeEventNameAsync)
import JSDOM.Generated.Enums
-- | <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 ((((Types.toTextDecoderCommon self) ^. js "encoding") >>= fromJSValUnchecked))
-- | <https://developer.mozilla.org/docs/Web/API/TextDecoder/fatal MDN TextDecoderCommon.fatal documentation>
getFatal :: (MonadDOM m, IsTextDecoderCommon self) => self -> m Bool
getFatal self = liftDOM ((((Types.toTextDecoderCommon self) ^. js "fatal") >>= valToBool))
-- | <https://developer.mozilla.org/docs/Web/API/TextDecoder/ignoreBOM MDN TextDecoderCommon.ignoreBOM documentation>
getIgnoreBOM :: (MonadDOM m, IsTextDecoderCommon self) => self -> m Bool
getIgnoreBOM self = liftDOM ((((Types.toTextDecoderCommon self) ^. js "ignoreBOM") >>= valToBool))