Renders the HTML representation of the element.
(self, **kwargs)
| 576 | ) |
| 577 | |
| 578 | def render(self, **kwargs): |
| 579 | """Renders the HTML representation of the element.""" |
| 580 | for name, child in self._children.items(): |
| 581 | child.render(**kwargs) |
| 582 | |
| 583 | figure = self.get_root() |
| 584 | assert isinstance( |
| 585 | figure, Figure |
| 586 | ), "You cannot render this Element if it is not in a Figure." |
| 587 | |
| 588 | figure.script.add_child( |
| 589 | Element(self._template.render(this=self, kwargs=kwargs)), |
| 590 | name=self.get_name(), |
| 591 | ) |
| 592 | |
| 593 | |
| 594 | class Tooltip(MacroElement): |