TagTemplate¶
- class domilite.template.TagTemplate(tag: type[H], attributes: Mapping[str, str | bool] | None = None, classes: Iterable[str] | None = None)[source]¶
Bases:
Generic[H]A helper for creating tags.
Holds the tag type as well as attributes for the tag. This can be used by calling the instance as a function to create a tag, or by calling the
update()method to apply the attributes to an existing tag.Attributes Summary
A helper property for accessing attributes with a prefix.
Property access to
AttributesProperty access to
ClassesA helper property for accessing attributes with a prefix.
A helper property for accessing attributes with a prefix.
Methods Summary
__call__(*args, **kwds)Create a tag from the attributes and classes.
update(tag)Update the tag with the attributes and classes.
Attributes Documentation
- aria: PrefixAccessor[TagTemplate]¶
A helper property for accessing attributes with a prefix.
See
PrefixAccess
- attributes: ClassVar[AttributesProperty[TagTemplate]]¶
Property access to
Attributes
- classes: ClassVar[ClassesProperty[TagTemplate]]¶
Property access to
Classes
- data: PrefixAccessor[TagTemplate]¶
A helper property for accessing attributes with a prefix.
See
PrefixAccess
- hx: PrefixAccessor[TagTemplate]¶
A helper property for accessing attributes with a prefix.
See
PrefixAccess
Methods Documentation