Skip to content

A java html library inspired by preact's h function, jsx and hyperscript.

License

Notifications You must be signed in to change notification settings

Crydust/simplehtml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simplehtml

DepShield Badge

A java html library inspired by preact's h function, jsx and hyperscript.

The only public class is "Html" and it contains static methods which allows us to write java code like this:

h("div", Map.of("id", "foo"),
  h("p", "Look, a simple html element!"),
  h("ul",
    h("li", h("p", "hello")),
    h("li", h("p", "there")),
    h("li", h("p", "people"))
  )
).getOuterHTML();

To generate this html:

<div id="foo">
  <p>Look, a simple html element!</p>
  <ul>
    <li><p>hello</p></li>
    <li><p>there</p></li>
    <li><p>people</p></li>
  </ul>
</div>

About

A java html library inspired by preact's h function, jsx and hyperscript.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages