ghcjs-dom-javascript-0.10.0.0: src/GHCJS/DOM/JSFFI/Generated/PerformanceEntry.hs
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ForeignFunctionInterface, JavaScriptFFI #-}
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- | Generated by dom-gen from performance-timeline (webref). Do not edit.
module GHCJS.DOM.JSFFI.Generated.PerformanceEntry
(js_toJSON, js_getName, js_getEntryType, js_getStartTime, js_getDuration, toJSON, toJSON_, getName, getEntryType, getStartTime, getDuration, PerformanceEntry(..), gTypePerformanceEntry, IsPerformanceEntry, toPerformanceEntry)
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 safe "(($1) => { return $1[\"toJSON\"](); })"
js_toJSON :: PerformanceEntry -> IO GObject
-- | <https://developer.mozilla.org/docs/Web/API/PerformanceEntry/toJSON MDN PerformanceEntry.toJSON documentation>
toJSON :: (MonadDOM m, IsPerformanceEntry self) => self -> m GObject
toJSON self = liftDOM ((js_toJSON ((Types.toPerformanceEntry self))))
-- | <https://developer.mozilla.org/docs/Web/API/PerformanceEntry/toJSON MDN PerformanceEntry.toJSON documentation>
toJSON_ :: (MonadDOM m, IsPerformanceEntry self) => self -> m ()
toJSON_ self = liftDOM (void ((js_toJSON ((Types.toPerformanceEntry self)))))
foreign import javascript unsafe "(($1) => { return $1[\"name\"]; })"
js_getName :: PerformanceEntry -> IO JSString
-- | <https://developer.mozilla.org/docs/Web/API/PerformanceEntry/name MDN PerformanceEntry.name documentation>
getName :: (MonadDOM m, IsPerformanceEntry self, FromJSString result) => self -> m result
getName self = liftDOM ((fromJSString <$> (js_getName ((Types.toPerformanceEntry self)))))
foreign import javascript unsafe "(($1) => { return $1[\"entryType\"]; })"
js_getEntryType :: PerformanceEntry -> IO JSString
-- | <https://developer.mozilla.org/docs/Web/API/PerformanceEntry/entryType MDN PerformanceEntry.entryType documentation>
getEntryType :: (MonadDOM m, IsPerformanceEntry self, FromJSString result) => self -> m result
getEntryType self = liftDOM ((fromJSString <$> (js_getEntryType ((Types.toPerformanceEntry self)))))
foreign import javascript unsafe "(($1) => { return $1[\"startTime\"]; })"
js_getStartTime :: PerformanceEntry -> IO Double
-- | <https://developer.mozilla.org/docs/Web/API/PerformanceEntry/startTime MDN PerformanceEntry.startTime documentation>
getStartTime :: (MonadDOM m, IsPerformanceEntry self) => self -> m Double
getStartTime self = liftDOM ((js_getStartTime ((Types.toPerformanceEntry self))))
foreign import javascript unsafe "(($1) => { return $1[\"duration\"]; })"
js_getDuration :: PerformanceEntry -> IO Double
-- | <https://developer.mozilla.org/docs/Web/API/PerformanceEntry/duration MDN PerformanceEntry.duration documentation>
getDuration :: (MonadDOM m, IsPerformanceEntry self) => self -> m Double
getDuration self = liftDOM ((js_getDuration ((Types.toPerformanceEntry self))))