| Copyright | (C) 2016-2025 David M. Johnson |
|---|---|
| License | BSD3-style (see the file LICENSE) |
| Maintainer | David M. Johnson <code@dmj.io> |
| Stability | experimental |
| Portability | non-portable |
| Safe Haskell | None |
| Language | Haskell2010 |
Miso.Property
Contents
Description
Construct custom properties on DOM elements
div_ [ prop "id" "foo" ] [ ]
Synopsis
- prop :: ToJSON a => MisoString -> a -> Attribute action
- textProp :: MisoString -> MisoString -> Attribute action
- stringProp :: MisoString -> String -> Attribute action
- boolProp :: MisoString -> Bool -> Attribute action
- intProp :: MisoString -> Int -> Attribute action
- integerProp :: MisoString -> Integer -> Attribute action
- doubleProp :: MisoString -> Double -> Attribute action
- objectProp :: MisoString -> Object -> Attribute action
- keyProp :: ToKey key => key -> Attribute action
- key_ :: ToKey key => key -> Attribute action
Smart constructors
prop :: ToJSON a => MisoString -> a -> Attribute action Source #
prop k v is an attribute that will set the attribute k of the DOM
node associated with the vnode to v.
textProp :: MisoString -> MisoString -> Attribute action Source #
Set field to MisoString value
stringProp :: MisoString -> String -> Attribute action Source #
Set field to String value
integerProp :: MisoString -> Integer -> Attribute action Source #
Set field to Integer value
doubleProp :: MisoString -> Double -> Attribute action Source #
Set field to Double value
objectProp :: MisoString -> Object -> Attribute action Source #
Set field to Object value