Documentation
¶
Overview ¶
Package jid provides JaWS element identifiers and helpers for writing them into HTML.
Index ¶
Constants ¶
const Invalid = Jid(-1)
Invalid is returned by parsers when text does not contain a valid Jid.
const Prefix = "Jid."
Prefix prefixes HTML IDs based on Jid values.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Jid ¶
type Jid int64
Jid is the basis for the HTML id attribute for a UI element within an active request.
It is request-scoped, meaning Jid(1) in one request is not the same element as Jid(1) in another request.
func ParseInt ¶
ParseInt parses a Jid integer and returns it as a Jid.
Returns Invalid if s is not a valid Jid integer or an error occurs.
func ParseString ¶
ParseString parses an unquoted Jid string, such as `Jid.2`, and returns the corresponding value.
func (Jid) AppendQuote ¶
AppendQuote appends the string format of the Jid surrounded by double quotes.
func (Jid) AppendStartTagAttr ¶
AppendStartTagAttr appends `<startTag` followed by the quoted Jid as an HTML id attribute when jid is non-zero.