You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-1Lines changed: 8 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -215,18 +215,22 @@ In order to allow the building of a dynamic page virtual elements need to be use
215
215
-```htmlgenerator.BaseElement```: The base for all elements, can also be used to group elements without generating output by itself
216
216
-```htmlgenerator.If```: Lazy evaluates the first argument at render time and returns the first child on true and the second child on false
217
217
-```htmlgenerator.Iterator```: Takes an iterator which can be a lazy value and renders the child element for each iteration
218
+
-```htmlgenerator.Fragment```: Allows to name a part of the tree which can then selectively be rendered by passing setting the ```fragment``` parameter when calling ```hg.render```
218
219
219
220
Example:
220
221
221
222
```python
222
-
from htmlgenerator import render, SPAN, BaseElement, If, C, Iterator
223
+
from htmlgenerator import render, SPAN, BaseElement, If, C, Iterator, Fragment, DIV, BODY
<span>I love loops </span><span>I love loops </span><span>I love loops </span><span>I love loops </span><span>I love loops </span><span>I love loops </span><span>I love loops </span>
243
+
244
+
<body>HTML body<div>Content of my page</div></body>
0 commit comments