Kaya 0.5.2 reference for HTMLDocument::setAttribute

List of functions and data types in HTMLDocument

Void setAttribute(ElementTree element, String name, String value)

Arguments

Usage

Sets an attribute on a HTML element. Required attributes will be set when you add the element by the addition function, but you may wish to add optional attributes here, or change the value of an existing attribute based on later calculations.

setAttribute(quotation,"lang","fr");

The setClass and setID functions should always be used in preference to this function for those purposes, as they do some input validation (and are shorter to type!)

Related

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