Introduce Placer interface (#18) 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.
1 file changed, 4 insertions(+), 0 deletions(-)
changed files
M attr/attributes.go → attr/attributes.go
@@ -35,6 +35,10 @@ sort.Strings(included) return g.Attr("class", strings.Join(included, " ")).Render() } +func (c Classes) Place() g.Placement { + return g.Inside +} + // String satisfies fmt.Stringer. func (c Classes) String() string { return c.Render()