Kaya 0.5.3 reference for HTMLDocument::setID

List of functions and data types in HTMLDocument

Void setID(ElementTree element, String idname)

Arguments

Usage

Sets the ID of a HTML element. The ID is a unique identifier within the document for the element. Setting IDs is useful for styling, scripting, and creating anchors within a document.

h = addHeading(body,2,"Compiler options");
setID(h,"opts");
// appending #opts to the URL will now jump straight to this heading

Related

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