ghcjs-dom-javascript-0.10.0.0: src/GHCJS/DOM/JSFFI/Generated/PromiseRejectionEventInit.hs
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ForeignFunctionInterface, JavaScriptFFI #-}
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- | Generated by dom-gen from html (webref). Do not edit.
module GHCJS.DOM.JSFFI.Generated.PromiseRejectionEventInit
(js_newPromiseRejectionEventInit, js_setPromise, js_getPromise, js_setReason, js_getReason, newPromiseRejectionEventInit, setPromise, getPromise, setReason, getReason, PromiseRejectionEventInit(..), gTypePromiseRejectionEventInit)
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 ({\"promise\": $1}); })"
js_newPromiseRejectionEventInit :: GObject -> IO PromiseRejectionEventInit
-- | <https://html.spec.whatwg.org/multipage/webappapis.html#promiserejectioneventinit PromiseRejectionEventInit specification>
newPromiseRejectionEventInit :: (MonadDOM m) => GObject -> m PromiseRejectionEventInit
newPromiseRejectionEventInit promise = liftDOM ((js_newPromiseRejectionEventInit (promise)))
foreign import javascript safe "(($1, $2) => { $1[\"promise\"] = $2; })"
js_setPromise :: PromiseRejectionEventInit -> GObject -> IO ()
setPromise :: (MonadDOM m) => PromiseRejectionEventInit -> GObject -> m ()
setPromise self val = liftDOM (void ((js_setPromise (self) (val))))
foreign import javascript unsafe "(($1) => { return $1[\"promise\"]; })"
js_getPromise :: PromiseRejectionEventInit -> IO GObject
getPromise :: (MonadDOM m) => PromiseRejectionEventInit -> m GObject
getPromise self = liftDOM ((js_getPromise (self)))
foreign import javascript safe "(($1, $2) => { $1[\"reason\"] = $2; })"
js_setReason :: PromiseRejectionEventInit -> JSVal -> IO ()
setReason :: (MonadDOM m) => PromiseRejectionEventInit -> JSVal -> m ()
setReason self val = liftDOM (void ((js_setReason (self) (val))))
foreign import javascript unsafe "(($1) => { return $1[\"reason\"]; })"
js_getReason :: PromiseRejectionEventInit -> IO JSVal
getReason :: (MonadDOM m) => PromiseRejectionEventInit -> m JSVal
getReason self = liftDOM ((js_getReason (self)))