Attribute
AttributeProccessor
Processes a list of Attribute objects and converts them into HTML-formatted attributes.
Attributes:
| Name | Type | Description |
|---|---|---|
attrKeyWords |
dict
|
Maps Python keywords to HTML attribute names.
- "styles": Translates to "class".
- "class_": Translates to "class" (avoids conflict with Python's |
attrValueWords |
dict
|
Maps Python boolean values to HTML-compliant strings. - "True": Translates to "true". - "False": Translates to "false". |
Source code in zenaura/client/compiler/attribute.py
process_attributes(attrs)
Processes a list of Attribute objects, converting them to HTML-formatted attributes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
attrs |
List[Attribute]
|
A list of |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
A string containing the HTML-formatted attributes, ready to be included in a tag. |
Raises:
| Type | Description |
|---|---|
TypeError
|
If the input |
ValueError
|
If any element in |