miso-1.12.0.0: src/Miso/Html/Property.hs
-----------------------------------------------------------------------------
{-# LANGUAGE OverloadedStrings #-}
-----------------------------------------------------------------------------
-- |
-- Module : Miso.Html.Property
-- Copyright : (C) 2016-2026 David M. Johnson
-- License : BSD3-style (see the file LICENSE)
-- Maintainer : David M. Johnson <code@dmj.io>
-- Stability : experimental
-- Portability : non-portable
--
-- = Overview
--
-- "Miso.Html.Property" provides smart constructors for
-- <https://developer.mozilla.org/en-US/docs/Web/API/Element#properties DOM properties>
-- and
-- <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes HTML attributes>.
-- Each produces an 'Miso.Types.Attribute' that the virtual DOM applies to
-- the corresponding DOM node on every render, diffing only changed values.
--
-- All names are suffixed with @_@ to avoid clashing with Haskell
-- 'Prelude' names. This module is re-exported in its entirety by
-- "Miso.Html" and "Miso".
--
-- = Quick start
--
-- @
-- import "Miso"
--
-- view :: Model -> 'Miso.Types.View' Model Action
-- view m =
-- 'Miso.Html.Element.div_' [ 'id_' \"app\", 'class_' \"container\" ]
-- [ 'Miso.Html.Element.input_'
-- [ 'type_' \"text\"
-- , 'value_' m.text
-- , 'placeholder_' \"Type here…\"
-- , 'disabled_'
-- ]
-- []
-- , 'Miso.Html.Element.img_'
-- [ 'src_' \"logo.png\", 'alt_' \"Logo\", 'width_' \"64\", 'height_' \"64\" ]
-- []
-- ]
-- @
--
-- = Class management
--
-- Four combinators handle CSS classes:
--
-- @
-- 'class_' \"foo bar\" -- single string, set className
-- 'className' \"foo bar\" -- alias for class_
-- 'classes_' [\"foo\", \"bar\"] -- list of class names
-- 'classList_' [(\"active\", isActive) -- conditional classes
-- ,(\"error\", hasError)]
-- @
--
-- = Property groups
--
-- * __Global__: 'id_', 'class_', 'className', 'classes_', 'classList_',
-- 'title_', 'lang_', 'hidden_', 'inert_', 'draggable_', 'tabindex_',
-- 'role_', 'data_', 'aria_', 'xmlns_'
-- * __Form__: 'type_', 'value_', 'defaultValue_', 'checked_', 'placeholder_',
-- 'selected_', 'disabled_', 'readonly_', 'required_', 'multiple_',
-- 'autofocus_', 'autocomplete_', 'autocorrect_', 'spellcheck_',
-- 'name_', 'for_', 'form_', 'action_', 'method_', 'enctype_',
-- 'noValidate_', 'accept_', 'acceptCharset_', 'pattern_',
-- 'min_', 'max_', 'step_', 'size_', 'maxlength_', 'minlength_',
-- 'list_', 'cols_', 'rows_', 'wrap_'
-- * __Link \/ anchor__: 'href_', 'target_', 'rel_', 'hreflang_',
-- 'download_', 'downloadAs_', 'ping_', 'media_'
-- * __Image \/ map__: 'src_', 'alt_', 'width_', 'height_', 'loading_',
-- 'ismap_', 'usemap_', 'shape_', 'coords_'
-- * __Media__: 'autoplay_', 'controls_', 'loop_', 'muted_', 'preload_',
-- 'poster_', 'volume_', 'currentTime_', 'defaultMuted_',
-- 'defaultPlaybackRate_', 'playbackRate_', 'seeking_', 'mediaGroup_'
-- * __Table__: 'colspan_', 'rowspan_', 'headers_', 'scope_', 'align_'
-- * __\<script\> \/ \<meta\>__: 'async_', 'defer_', 'charset_', 'content_',
-- 'httpEquiv_', 'language_', 'scoped_'
-- * __\<iframe\>__: 'sandbox_', 'seamless_', 'srcdoc_', 'frameborder_',
-- 'scrolling_'
-- * __Misc__: 'open_', 'reversed_', 'default_', 'kind_', 'srclang_',
-- 'label_', 'autosave_', 'formation_', 'ref_'
--
-- = See also
--
-- * "Miso.Property" — lower-level 'Miso.Property.textProp', 'Miso.Property.boolProp',
-- 'Miso.Property.intProp', 'Miso.Property.doubleProp' combinators
-- * "Miso.Html.Element" — element constructors that accept these attributes
-- * "Miso.Html.Event" — event-handler attributes
-- * "Miso.CSS" — style property DSL ('Miso.CSS.style_', 'Miso.CSS.styleInline_')
-----------------------------------------------------------------------------
module Miso.Html.Property
( -- *** Combinators
class_
, className
, classes_
, classList_
, id_
, title_
, hidden_
, inert_
, lang_
, type_
, value_
, defaultValue_
, checked_
, placeholder_
, selected_
, accept_
, acceptCharset_
, action_
, autocomplete_
, autofocus_
, autosave_
, disabled_
, enctype_
, formation_
, list_
, maxlength_
, minlength_
, method_
, multiple_
, name_
, noValidate_
, pattern_
, readonly_
, required_
, size_
, for_
, ref_
, form_
, max_
, min_
, step_
, cols_
, rows_
, wrap_
, href_
, target_
, download_
, downloadAs_
, hreflang_
, media_
, ping_
, rel_
, ismap_
, usemap_
, shape_
, coords_
, src_
, height_
, width_
, alt_
, loading_
, autoplay_
, currentTime_
, defaultMuted_
, volume_
, controls_
, loop_
, defaultPlaybackRate_
, mediaGroup_
, muted_
, playbackRate_
, seeking_
, preload_
, poster_
, default_
, kind_
, srclang_
, sandbox_
, seamless_
, srcdoc_
, reversed_
, align_
, colspan_
, rowspan_
, headers_
, scope_
, async_
, charset_
, content_
, defer_
, httpEquiv_
, language_
, scoped_
, data_
, autocorrect_
, spellcheck_
, role_
, xmlns_
, aria_
, label_
, draggable_
, frameborder_
, scrolling_
, tabindex_
, open_
) where
-----------------------------------------------------------------------------
import Miso.Types
import Miso.Property
-----------------------------------------------------------------------------
-- | Define multiple classes conditionally
--
-- > div_ [ classList_ [ ("empty", null items) ] [ ]
--
classList_ :: [(MisoString, Bool)] -> Attribute action
classList_ xs = classList [ t | (t, True) <- xs ]
-----------------------------------------------------------------------------
-- | Define multiple classes
--
-- > div_ [ classes_ [ "red", "warning" ] ] []
--
classes_ :: [MisoString] -> Attribute action
classes_ = classList
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/title>
title_ :: MisoString -> Attribute action
title_ = textProp "title"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option#selected>
selected_ :: Bool -> Attribute action
selected_ = boolProp "selected"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/hidden>
hidden_ :: Bool -> Attribute action
hidden_ = boolProp "hidden"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inert>
inert_ :: Bool -> Attribute action
inert_ = boolProp "inert"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang>
lang_ :: MisoString -> Attribute action
lang_ = textProp "lang"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/value>
value_ :: MisoString -> Attribute action
value_ = textProp "value"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/defaultValue>
defaultValue_ :: MisoString -> Attribute action
defaultValue_ = textProp "defaultValue"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/accept>
accept_ :: MisoString -> Attribute action
accept_ = textProp "accept"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/acceptCharset>
acceptCharset_ :: MisoString -> Attribute action
acceptCharset_ = textProp "acceptCharset"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/action>
action_ :: MisoString -> Attribute action
action_ = textProp "action"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autocomplete>
autocomplete_ :: Bool -> Attribute action
autocomplete_ b = textProp "autocomplete" (if b then "on" else "off")
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autosave>
autosave_ :: MisoString -> Attribute action
autosave_ = textProp "autosave"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autocorrect>
autocorrect_ :: Bool -> Attribute action
autocorrect_ b = textProp "autocomplete" (if b then "on" else "off")
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/spellcheck>
spellcheck_ :: Bool -> Attribute action
spellcheck_ b = textProp "autocomplete" (if b then "on" else "off")
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/role>
role_ :: MisoString -> Attribute action
role_ = textProp "role"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/disabled>
disabled_ :: Attribute action
disabled_ = boolProp "disabled" True
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/enctype>
enctype_ :: MisoString -> Attribute action
enctype_ = textProp "enctype"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/formation>
formation_ :: MisoString -> Attribute action
formation_ = textProp "formation"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/list>
list_ :: MisoString -> Attribute action
list_ = textProp "list"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/maxlength>
maxlength_ :: MisoString -> Attribute action
maxlength_ = textProp "maxlength"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/minlength>
minlength_ :: MisoString -> Attribute action
minlength_ = textProp "minlength"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/method>
method_ :: MisoString -> Attribute action
method_ = textProp "method"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/multiple>
multiple_ :: Bool -> Attribute action
multiple_ = boolProp "multiple"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/noValidate>
noValidate_ :: Bool -> Attribute action
noValidate_ = boolProp "noValidate"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/pattern>
pattern_ :: MisoString -> Attribute action
pattern_ = textProp "pattern"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/details#open>
open_ :: Bool -> Attribute action
open_ = boolProp "open"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/readonly>
readonly_ :: Bool -> Attribute action
readonly_ = boolProp "readOnly"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/required>
required_ :: Bool -> Attribute action
required_ = boolProp "required"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/size>
size_ :: MisoString -> Attribute action
size_ = textProp "size"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/for>
for_ :: MisoString -> Attribute action
for_ = textProp "for"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/ref>
ref_ :: MisoString -> Attribute action
ref_ = textProp "ref"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/form>
form_ :: MisoString -> Attribute action
form_ = textProp "form"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/max>
max_ :: MisoString -> Attribute action
max_ = textProp "max"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/min>
min_ :: MisoString -> Attribute action
min_ = textProp "min"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/step>
step_ :: MisoString -> Attribute action
step_ = textProp "step"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/cols>
cols_ :: MisoString -> Attribute action
cols_ = textProp "cols"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/rows>
rows_ :: MisoString -> Attribute action
rows_ = textProp "rows"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/wrap>
wrap_ :: MisoString -> Attribute action
wrap_ = textProp "wrap"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/target>
target_ :: MisoString -> Attribute action
target_ = textProp "target"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/download>
download_ :: MisoString -> Attribute action
download_ = textProp "download"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/downloadAs>
downloadAs_ :: MisoString -> Attribute action
downloadAs_ = textProp "downloadAs"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/hreflang>
hreflang_ :: MisoString -> Attribute action
hreflang_ = textProp "hreflang"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/media>
media_ :: MisoString -> Attribute action
media_ = textProp "media"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/ping>
ping_ :: MisoString -> Attribute action
ping_ = textProp "ping"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/rel>
rel_ :: MisoString -> Attribute action
rel_ = textProp "rel"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/isMap>
ismap_ :: Bool -> Attribute action
ismap_ = boolProp "ismap"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/usemap>
usemap_ :: MisoString -> Attribute action
usemap_ = textProp "usemap"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/shape>
shape_ :: MisoString -> Attribute action
shape_ = textProp "shape"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/coords>
coords_ :: MisoString -> Attribute action
coords_ = textProp "coords"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/src>
src_ :: MisoString -> Attribute action
src_ = textProp "src"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/height>
height_ :: MisoString -> Attribute action
height_ = textProp "height"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/width>
width_ :: MisoString -> Attribute action
width_ = textProp "width"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/alt>
alt_ :: MisoString -> Attribute action
alt_ = textProp "alt"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/loading>
loading_ :: MisoString -> Attribute action
loading_ = textProp "loading"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/autoplay>
autoplay_ :: Bool -> Attribute action
autoplay_ = boolProp "autoplay"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/currentTime>
currentTime_ :: Double -> Attribute action
currentTime_ = doubleProp "currentTime"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/defaultMuted>
defaultMuted_ :: Bool -> Attribute action
defaultMuted_ = boolProp "defaultMuted"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/defaultPlaybackRate>
defaultPlaybackRate_ :: Double -> Attribute action
defaultPlaybackRate_ = doubleProp "defaultPlaybackRate"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/mediaGroup>
mediaGroup_ :: MisoString -> Attribute action
mediaGroup_ = textProp "mediaGroup"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/muted>
muted_ :: Bool -> Attribute action
muted_ = boolProp "muted"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/playbackRate>
playbackRate_ :: Double -> Attribute action
playbackRate_ = doubleProp "playbackRate"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/preload>
preload_ :: MisoString -> Attribute action
preload_ = textProp "preload"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/seeking>
seeking_ :: Bool -> Attribute action
seeking_ = boolProp "seeking"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/volume>
volume_ :: Double -> Attribute action
volume_ = doubleProp "volume"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/controls>
controls_ :: Bool -> Attribute action
controls_ = boolProp "controls"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/loop>
loop_ :: Bool -> Attribute action
loop_ = boolProp "loop"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement/poster>
poster_ :: MisoString -> Attribute action
poster_ = textProp "poster"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/default>
default_ :: Bool -> Attribute action
default_ = boolProp "default"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/kind>
kind_ :: MisoString -> Attribute action
kind_ = textProp "kind"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/srclang>
srclang_ :: MisoString -> Attribute action
srclang_ = textProp "srclang"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/sandbox>
sandbox_ :: MisoString -> Attribute action
sandbox_ = textProp "sandbox"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/seamless>
seamless_ :: MisoString -> Attribute action
seamless_ = textProp "seamless"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/srcdoc>
srcdoc_ :: MisoString -> Attribute action
srcdoc_ = textProp "srcdoc"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/ol#reversed>
reversed_ :: Bool -> Attribute action
reversed_ = boolProp "reversed"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/align>
align_ :: MisoString -> Attribute action
align_ = textProp "align"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/colspan>
colspan_ :: MisoString -> Attribute action
colspan_ = textProp "colspan"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/rowspan>
rowspan_ :: MisoString -> Attribute action
rowspan_ = textProp "rowspan"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/headers>
headers_ :: MisoString -> Attribute action
headers_ = textProp "headers"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/scope>
scope_ :: MisoString -> Attribute action
scope_ = textProp "scope"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/async>
async_ :: Bool -> Attribute action
async_ = boolProp "async"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/charset>
charset_ :: MisoString -> Attribute action
charset_ = textProp "charset"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/content>
content_ :: MisoString -> Attribute action
content_ = textProp "content"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLScriptElement/defer>
defer_ :: Bool -> Attribute action
defer_ = boolProp "defer"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/httpEquiv>
httpEquiv_ :: MisoString -> Attribute action
httpEquiv_ = textProp "httpEquiv"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/language>
language_ :: MisoString -> Attribute action
language_ = textProp "language"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/scoped>
scoped_ :: MisoString -> Attribute action
scoped_ = textProp "scoped"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/type>
type_ :: MisoString -> Attribute action
type_ = textProp "type"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLLinkElement/name>
name_ :: MisoString -> Attribute action
name_ = textProp "name"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLLinkElement/href>
href_ :: MisoString -> Attribute action
href_ = textProp "href"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id>
id_ :: MisoString -> Attribute action
id_ = textProp "id"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/placeholder>
placeholder_ :: MisoString -> Attribute action
placeholder_ = textProp "placeholder"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/checked>
checked_ :: Bool -> Attribute action
checked_ = boolProp "checked"
-----------------------------------------------------------------------------
-- | <https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus>
autofocus_ :: Bool -> Attribute action
autofocus_ = boolProp "autofocus"
-----------------------------------------------------------------------------
-- | Set "className" property
-- <https://developer.mozilla.org/en-US/docs/Web/API/Element/className>
class_ :: MisoString -> Attribute action
class_ = className
-----------------------------------------------------------------------------
-- | Set "className" property
-- <https://developer.mozilla.org/en-US/docs/Web/API/Element/className>
className :: MisoString -> Attribute action
className name = classList [name]
-----------------------------------------------------------------------------
-- | Set "data-*" property
-- https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/data-*
data_ :: MisoString -> MisoString -> Attribute action
data_ k v = textProp ("data-" <> k) v
-----------------------------------------------------------------------------
-- | @since 1.9.0.0
xmlns_ :: MisoString -> Attribute action
xmlns_ = textProp "xmlns"
-----------------------------------------------------------------------------
-- | @since 1.9.0.0
aria_ :: MisoString -> MisoString -> Attribute action
aria_ k = textProp ("aria-" <> k)
-----------------------------------------------------------------------------
-- | @since 1.9.0.0
label_ :: MisoString -> Attribute action
label_ = textProp "label"
-----------------------------------------------------------------------------
-- | @since 1.9.0.0
draggable_ :: Bool -> Attribute action
draggable_ = boolProp "draggable"
-----------------------------------------------------------------------------
-- | @since 1.9.0.0
scrolling_ :: MisoString -> Attribute action
scrolling_ = textProp "scrolling"
-----------------------------------------------------------------------------
-- | @since 1.9.0.0
frameborder_ :: MisoString -> Attribute action
frameborder_ = textProp "frameborder"
-----------------------------------------------------------------------------
-- | [tabindex](https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Attribute/tabindex) attribute
--
-- @since 1.9.0.0
tabindex_ :: MisoString -> Attribute action
tabindex_ = textProp "tabindex"
-----------------------------------------------------------------------------