logo

class

web::UserAgent

sys::Obj
  web::UserAgent

UserAgent identifies a user agent.

Slots

fromStr

new fromStr(Str userAgentStr)

Construct a new UserAgent with this user agent string.

Source

isFirefox

readonly Bool isFirefox := false

Is this user agent Mozilla Firefox.

Source

isIE

readonly Bool isIE := false

Is this user agent Microsoft Internet Explorer.

Source

isOpera

readonly Bool isOpera := false

Is this agent Opera.

Source

isSafari

readonly Bool isSafari := false

Is this agent Apple Safari.

Source

toStr

override Str toStr()

Return a string representation of this object. The result of this method will match the original Str that was used to parse this UserAgent.

Source

tokens

readonly Str[] tokens := Str[,]

The tokens identifying this user agent in the order they were parsed. This list is readonly.

Source

version

readonly Version version

The primary version for this user agent. This field is only valid if the user agent is IE, Firefox, Safari, or Opera. For all other browsers, or if the above list has an invalid version string, this field will default to "0.0".

Source