Closed m-ober closed 5 months ago
The documentation is wrong/misleading. You would need to sth like this instead
$ul = Html::el('ul');
$ul->create('li', ['class' => 'first'])->setText('hello');
Thanks for the response - working with the $ul
variable gives the expected result.
fixed in documentation
Version: 4.0.4
Bug Description
The example (taken from documentation)
is not working es expected.
Steps To Reproduce
https://fiddle.nette.org/nette/#1ce0434e2a
The output is:
<li class="first">hello</li>
Expected Behavior
According to the docs, the output should be
<ul><li class="first">hello</li></ul>