Add formxxx attributes (for <input type="submit"> element) (#241) Hello, A small patch to add the following attributes: - formaction - formenctype - formmethod - formnovalidate - formtarget These attributes are useful in `<input type="submit">` element: [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/submit#additional_attributes)
1 file changed, 20 insertions(+), 0 deletions(-)
changed files
M html/attributes.go → html/attributes.go
@@ -141,8 +141,28 @@ func For(v string) g.Node { return g.Attr("for", v) } +func FormAction(v string) g.Node { + return g.Attr("formaction", v) +} + func FormAttr(v string) g.Node { return g.Attr("form", v) +} + +func FormEncType(v string) g.Node { + return g.Attr("formenctype", v) +} + +func FormMethod(v string) g.Node { + return g.Attr("formmethod", v) +} + +func FormNoValidate() g.Node { + return g.Attr("formnovalidate") +} + +func FormTarget(v string) g.Node { + return g.Attr("formtarget", v) } func Height(v string) g.Node {