hatmill/attribute/accesskey.go

17 lines
293 B
Go
Raw Normal View History

2019-04-27 21:00:56 +00:00
package attribute
import "git.codemonkeysoftware.net/b/hatmill"
2019-04-27 21:00:56 +00:00
2019-08-31 18:51:48 +00:00
type AccessKeyCode rune
func (c AccessKeyCode) String() string {
return string([]rune{rune(c)})
}
2019-04-27 21:00:56 +00:00
func Accesskey(value rune) hatmill.Attrib {
2019-04-28 17:40:41 +00:00
return hatmill.Attrib{
Key: "accesskey",
2019-08-31 18:51:48 +00:00
Value: AccessKeyCode(value),
2019-04-28 17:40:41 +00:00
}
2019-04-27 21:00:56 +00:00
}