VivoQuant
|
An object to manage html elements of a WebECRF form. More...
Public Member Functions | |
void | appendInsideHTML (string html) |
Appends the given html inside the element. More... | |
void | appendOutsideHTML (string html) |
Appends the given html outside the element. More... | |
void | setAttribute (string key, string value) |
Sets an attribute value. More... | |
void | setProperty (string propertyName, string value) |
Sets a property value. More... | |
void | addClass (string className) |
Adds a class to an element. More... | |
void | setPlainText (string text) |
Set and element with the given plain text. More... | |
bool | hasAttribute (string key) |
Check if an element has the given attribute key. More... | |
string | getAttribute (string key, string defaultVal=string()) |
Gets a given attribute value. More... | |
string | toString () |
Gets the element as a string. More... | |
string | tagName () |
Gets the tag name of the element. More... | |
Array< string > | classes () |
Gets the list of classes contained in the element. More... | |
string | plainText () |
Gets the element as plain text. More... | |
void | evalJavaScript (string js) |
Evaluate JavaScript on the element. | |
An object to manage html elements of a WebECRF form.
It provides functions to access the element's HTML directly or access the attributes of the element.
See also WebECRF::getElement() or WebECRF::getAllElement() to obtain this object.
void addClass | ( | string | className | ) |
Adds a class to an element.
className | The class name to add |
void appendInsideHTML | ( | string | html | ) |
Appends the given html inside the element.
html | The html to append |
void appendOutsideHTML | ( | string | html | ) |
Appends the given html outside the element.
html | The html to append |
Array<string> classes | ( | ) |
Gets the list of classes contained in the element.
string getAttribute | ( | string | key, |
string | defaultVal = string() |
||
) |
Gets a given attribute value.
key | The given attribute key |
defaultVal | The default attribute value if it doesn't exist |
bool hasAttribute | ( | string | key | ) |
Check if an element has the given attribute key.
key | The given attribute key |
string plainText | ( | ) |
Gets the element as plain text.
void setAttribute | ( | string | key, |
string | value | ||
) |
Sets an attribute value.
key | The attribute key |
value | The new attribute value |
void setPlainText | ( | string | text | ) |
Set and element with the given plain text.
text | The given plain text |
void setProperty | ( | string | propertyName, |
string | value | ||
) |
Sets a property value.
propertyName | The property name |
value | The new property value |
string tagName | ( | ) |
Gets the tag name of the element.
string toString | ( | ) |
Gets the element as a string.