Package

purescript-nonbili-dom

Repository
nonbili/purescript-nonbili-dom
License
BSD-3-Clause
Uploaded by
rnons
Published on
2019-10-08T01:36:45Z

purescript-nonbili-dom on Pursuit CircleCI

Some helpful DOM functions.

-- | Copy a string to clipbard.
copyToClipboard :: String -> Effect Unit

-- | Fit <input> width to its content width without showing scrollbar.
fitInputWidth :: HTMLElement.HTMLElement -> Number -> Effect Unit

-- | Fit <textarea> height to content height without showing scrollbar.
fitTextareaHeight :: HTMLElement.HTMLElement -> Number -> Effect Unit

-- | Get inner HTML of an element.
innerHTML :: Element -> Effect String

-- | Set inner HTML of an element.
setInnerHTML :: Element -> String -> Effect Unit

-- | Get rendered text content of an element.
innerText :: HTMLElement -> Effect String

-- | Set rendered text content of an element.
setInnerText :: HTMLElement -> String -> Effect Unit
Modules
Nonbili.DOM
Dependencies