Added formmethod attribute helper
This commit is contained in:
parent
ae85431082
commit
d24afba75c
17
CHANGELOG.md
17
CHANGELOG.md
@ -1,5 +1,13 @@
|
||||
# Changelog
|
||||
|
||||
## [unreleased]
|
||||
|
||||
- `attribute.Formmethod` helper function
|
||||
|
||||
### Changed
|
||||
|
||||
- Formatted code identifiers in Changelog
|
||||
|
||||
## [0.0.4] - 2019-05-27
|
||||
|
||||
### Added
|
||||
@ -9,22 +17,25 @@
|
||||
### Changed
|
||||
|
||||
- Element and attribute specs can define custom function doc comments.
|
||||
- element.A and attribute.Accept specs have comments.
|
||||
- `element.A` and `attribute.Accept` specs have comments.
|
||||
|
||||
## [0.0.3] - 2019-05-11
|
||||
|
||||
### Added
|
||||
|
||||
- Benchmark against `html/template`
|
||||
|
||||
## [0.0.2] - 2019-04-28
|
||||
|
||||
### Added
|
||||
|
||||
- Changelog
|
||||
- `hatmill.Terms` type for representing lists of nodes
|
||||
|
||||
### Changed
|
||||
- Attrib.WriteTo replaces special characters in Value with HTML entities.
|
||||
- Text.WriteTo replaces special characters with HTML entities.
|
||||
|
||||
- `Attrib.WriteTo` replaces special characters in `Value` with HTML entities.
|
||||
- `Text.WriteTo` replaces special characters with HTML entities.
|
||||
|
||||
## [0.0.1] - 2019-04-28
|
||||
|
||||
|
@ -270,6 +270,14 @@ func Formaction(value string) hatmill.Attrib {
|
||||
}
|
||||
}
|
||||
|
||||
// Formmethod creates a "formmethod" attribute
|
||||
func Formmethod(value string) hatmill.Attrib {
|
||||
return hatmill.Attrib{
|
||||
Key: "formmethod",
|
||||
Value: value,
|
||||
}
|
||||
}
|
||||
|
||||
// Headers creates a "headers" attribute
|
||||
func Headers(value string) hatmill.Attrib {
|
||||
return hatmill.Attrib{
|
||||
|
@ -34,6 +34,7 @@
|
||||
{"name": "for", "type": "string"},
|
||||
{"name": "form", "type": "string"},
|
||||
{"name": "formaction", "type": "string"},
|
||||
{"name": "formmethod", "type": "string"},
|
||||
{"name": "headers", "type": "string"},
|
||||
{"name": "height", "type": "int"},
|
||||
{"name": "hidden", "type": "bool"},
|
||||
|
Loading…
Reference in New Issue
Block a user