| Commit message (Collapse) | Author | Age | Lines |
|
|
|
|
|
|
| |
The Render function has been changed to take a `Writer` instead of returning a string. This makes it possible to generate documents without having the whole content in memory.
This also removes the `gomponents.Write` function, which is now redundant.
Furthermore, the `el.Document` function has been changed to only take one child, as multiple children never make sense for it. (It's not even a child, more a sibling.)
|
| |
|
|
|
| |
Also refactor tests to be table-driven, for readability.
|
|
|
| |
According to the section at https://developer.mozilla.org/en-US/docs/Web/HTML/Element
|
| |
|
| |
|
|
|
|
|
| |
When implemented, the `Place` method of the `Placer` interface tells `Render` in `El` where to put a Node. This is relevant for helpers that want to be rendered like attributes, inside the parent element.
Fixes the bug where `attr.Classes` was rendered outside the element.
|
|
|
| |
This makes the usage syntax prettier. Instead of `attr.Classes(map[string]bool{})`, we can just use `attr.Classes{}`.
|
|
|