module JavaScript.Object.Internal
( Object(..)
, create
, listProps
, getProp
, unsafeGetProp
, setProp
, unsafeSetProp
) where
import Language.Javascript.JSaddle.Types (JSM, JSVal, Object(..), JSString)
import Language.Javascript.JSaddle.Native.Internal
(newEmptyObject, propertyNames, getPropertyByName, setPropertyByName)
create :: JSM Object
create = newEmptyObject
listProps :: Object -> JSM [JSString]
listProps = propertyNames
getProp :: JSString -> Object -> JSM JSVal
getProp = unsafeGetProp
unsafeGetProp :: JSString -> Object -> JSM JSVal
unsafeGetProp = getPropertyByName
setProp :: JSString -> JSVal -> Object -> JSM ()
setProp = unsafeSetProp
unsafeSetProp :: JSString -> JSVal -> Object -> JSM ()
unsafeSetProp = setPropertyByName