| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Language.Javascript.JSaddle.Properties
Description
Low level JavaScript object property access. In most cases you should use Language.Javascript.JSaddle.Object instead.
This module is mostly here to implement functions needed to use
JSPropRef.
- objGetPropertyByName :: ToJSString name => Object -> name -> JSM JSVal
- objGetPropertyAtIndex :: Object -> Index -> JSM JSVal
- objSetPropertyByName :: (ToJSString name, ToJSVal val) => Object -> name -> val -> JSM ()
- objSetPropertyAtIndex :: ToJSVal val => Object -> Index -> val -> JSM ()
Getting Property Values
Arguments
| :: ToJSString name | |
| => Object | object to find the property on. |
| -> name | name of the property. |
| -> JSM JSVal | returns the property value. |
Get a property value given the object and the name of the property.
objGetPropertyAtIndex Source #
Arguments
| :: Object | object to find the property on. |
| -> Index | index of the property. |
| -> JSM JSVal | returns the property value. |
Get a property value given the object and the index of the property.
Setting Property Values
Arguments
| :: (ToJSString name, ToJSVal val) | |
| => Object | object to set the property on. |
| -> name | name of the property. |
| -> val | new value to set the property to. |
| -> JSM () |
Set a property value given the object and the name of the property.