2013-02-27 07:26:28 +00:00
|
|
|
|
|
|
|
module JavaScript where
|
|
|
|
|
2013-03-03 05:43:44 +00:00
|
|
|
|
2013-03-24 12:45:56 +00:00
|
|
|
-- Requires that the input array be uniform (all members have the same type)
|
2013-03-10 08:54:37 +00:00
|
|
|
toList : JSArray a -> [a]
|
2013-03-03 05:43:44 +00:00
|
|
|
toInt : JSNumber -> Int
|
|
|
|
toFloat : JSNumber -> Float
|
|
|
|
toBool : JSBool -> Bool
|
2013-05-17 20:46:08 +00:00
|
|
|
toString : JSString -> String
|
2013-03-03 05:43:44 +00:00
|
|
|
|
|
|
|
|
2013-03-24 12:45:56 +00:00
|
|
|
-- Produces a uniform JavaScript array with all members of the same type.
|
2013-03-10 08:54:37 +00:00
|
|
|
fromList : [a] -> JSArray a
|
2013-03-03 05:43:44 +00:00
|
|
|
fromInt : Int -> JSNumber
|
|
|
|
fromFloat : Float -> JSNumber
|
|
|
|
fromBool : Bool -> JSBool
|
2013-05-17 20:46:08 +00:00
|
|
|
fromString : String -> JSString
|
2013-03-03 05:43:44 +00:00
|
|
|
|
2013-03-24 12:45:56 +00:00
|
|
|
|
2013-05-17 20:46:08 +00:00
|
|
|
-- Turn an `Element` into a plain old DOM node.
|
|
|
|
fromElement : Element -> JSDomNode
|
2013-03-24 12:45:56 +00:00
|
|
|
|
2013-05-17 20:46:08 +00:00
|
|
|
-- Turn a DOM node into an `Element`. You can resize the node
|
|
|
|
-- using the normal `width` and `height` functions.
|
|
|
|
toElement : Int -> Int -> JSDomNode -> Element
|