Skip to content

Latest commit

 

History

History
30 lines (21 loc) · 1.23 KB

README.md

File metadata and controls

30 lines (21 loc) · 1.23 KB

purescript-nonbili-dom

GitHub release (latest by date) 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