Skip to content
This repository has been archived by the owner on Oct 9, 2022. It is now read-only.

Commit

Permalink
Update dom.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
sanity committed Dec 8, 2020
1 parent 91b62ae commit 61289bd
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions dom.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,11 @@ If you assign the button element to a val then you can also modify its attribute
button.classes("bigbutton")
button.setAttributeRaw("autofocus", true)
Or equivalently using Kotlin's apply `scope function <https://kotlinlang.org/docs/reference/scope-functions.html>`_:
Attributes can also be specified in a Map when you create the element:

.. code-block:: kotlin
button().apply {
text("Click Me!")
classes("bigbutton")
setAttributeRaw("autofocus", true)
}
button(mapOf("class" to "bigbutton", "autofocus" to true)).text("Click Me!")
Or delete it:

Expand Down

0 comments on commit 61289bd

Please sign in to comment.