Kaya 0.5.3 reference for HTMLDocument::getAttribute

List of functions and data types in HTMLDocument

Maybe<String> getAttribute(ElementTree element, String name)

Arguments

Usage

Gets an attribute value from a HTML element, or nothing if the attribute is not set.

case getAttribute(el,"class") of {
    nothing -> setClass(el,"recentchange");
    | just(c) -> setClass(el,c+" recentchange");
}

Related

kaya@kayalang.org | Last modified 29 November 2011 | Supported by Durham CompSoc | Powered by Kaya