Taggable

class bootlace.util.Taggable(*args, **kwargs)[source]

Bases: Protocol

Protocol for objects that can be converted to a tag.

Methods Summary

__tag__()

Convert the object to a dominate tag.

Methods Documentation

__tag__() dom_tag[source]

Convert the object to a dominate tag.

This method gives objects control over how they are processed by as_tag(). It should return a dominate tag. If a taggable object contains other taggable objects, it should use as_tag() to convert them, and then apply any additional processing as necessary to the returned html_tag.

Returns:

A dominate tag.