Bonsai.Html
- Package
- purescript-bonsai
- Repository
- grmble/purescript-bonsai
Bonsai Html Markup
View code is expected to import this module plus Bonsai.Html.Attributes and Bonsai.Html.Events
Re-exports from Bonsai.Html.Elements
#blockquote Source
blockquote :: MarkupT ~> MarkupT
Represents content that is quoted from another source
Re-exports from Bonsai.Html.Internal
#(#!?) Source
Operator alias for Bonsai.Html.Internal.withOptionalStyle (left-associative / precedence 4)
#(!?) Source
Operator alias for Bonsai.Html.Internal.withOptionalAttribute (left-associative / precedence 4)
Re-exports from Bonsai.VirtualDom
#Property Source
newtype Property msg
When using HTML and JS, there are two ways to specify parts of a DOM node.
Attributes — You can set things in HTML itself. So the
class
in<div class="greeting"></div>
is called an attribute.Properties — You can also set things in JS. So the
className
indiv.className = 'greeting'
is called a property.
So the class
attribute corresponds to the className
property. At first
glance, perhaps this distinction is defensible, but it gets much crazier.
There is not always a one-to-one mapping between attributes and properties!
Yes, that is a true fact. Sometimes an attribute exists, but there is no
corresponding property. Sometimes changing an attribute does not change the
underlying property. For example, as of this writing, the webkit-playsinline
attribute can be used in HTML, but there is no corresponding property!
#onWithOptions Source
onWithOptions :: forall msg aff. String -> Options -> CmdDecoder aff msg -> Property msg
Same as on
but you can set a few options.
#on Source
on :: forall msg eff. String -> (CmdDecoder eff msg) -> Property msg
Create a custom event listener.
#defaultOptions Source
defaultOptions :: Options
Everything is False
by default.
defaultOptions =
{ stopPropagation = False
, preventDefault = False
}