module JavaScript.Object.Internal
( Object(..)
, create
, allProps
, listProps
, getProp
, unsafeGetProp
, setProp
, unsafeSetProp
, isInstanceOf
) where
import Data.JSString
import Data.Typeable
import qualified GHCJS.Prim as Prim
import GHCJS.Types
import qualified JavaScript.Array as JA
import JavaScript.Array.Internal (JSArray)
newtype Object = Object JSVal deriving (Typeable)
instance IsJSVal Object
create :: IO Object
create = pure (Object nullRef)
allProps :: Object -> IO JSArray
allProps _ = pure $ JA.fromList []
listProps :: Object -> IO [JSString]
listProps _ = pure []
getProp :: JSString -> Object -> IO JSVal
getProp _ _ = pure nullRef
unsafeGetProp :: JSString -> Object -> IO JSVal
unsafeGetProp _ _ = pure nullRef
setProp :: JSString -> JSVal -> Object -> IO ()
setProp _ _ _ = pure ()
unsafeSetProp :: JSString -> JSVal -> Object -> IO ()
unsafeSetProp _ _ _ = pure ()
isInstanceOf :: Object -> JSVal -> Bool
isInstanceOf _ _ = False