Skip to content

Commit

Permalink
Merge branch 'master' of github.com:cy6erGn0m/html4k
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Mashkov committed Apr 12, 2015
2 parents 9e7ce09 + 12a1181 commit f0dd197
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ Probably need to be imported to kotlinx.html

Provides DSL to build HTML to Writer/Appendable or DOM at JVM and JavaScript

**Work is in progress yet so most tags and attributes are missing yet and need to be generated from HTML schema**

# Stream
You can build HTML directly to Writer (JVM only) or Appendable (both JVM and JS)

Expand All @@ -14,7 +12,7 @@ System.out.appendHTML().html {
body {
div {
a("http://kotlinlang.org") {
target = Targets._blank
target = ATarget.blank
+"Main site"
}
}
Expand All @@ -39,7 +37,7 @@ See example at JavaScript

```kotlin
window.setInterval({
document.getElementById("container").buildAndAppendChild {
document.getElementById("container").append {
div {
+"added it"
}
Expand All @@ -55,7 +53,7 @@ Here is example that filters HTML that way so all div will be omited but content
```kotlin
println(document {
appendChild(
buildHTML().filter { if (it.name == "div") SKIP else PASS }.html {
createTree().filter { if (it.name == "div") SKIP else PASS }.html {
body {
div {
a { +"link1" }
Expand Down

0 comments on commit f0dd197

Please sign in to comment.