Tag¶
- class bootlace.util.Tag(tag: type[H], classes: set[str] = NOTHING, attributes: dict[str, str] = NOTHING)[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
The attributes to apply to the tag
The classes to apply to the tag
The tag type
Methods Summary
__call__(*args, **kwds)Create a tag from the attributes and classes.
__tag__()Create a tag from the attributes and classes.
update(tag)Update the tag with the attributes and classes.
Attributes Documentation
- attributes: dict[str, str]¶
The attributes to apply to the tag
- classes: set[str]¶
The classes to apply to the tag
- tag: type[H]¶
The tag type
Methods Documentation