Skip to content

Update index.tsx #149

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions client/posts/append-to-an-element/index.tsx
Original file line number Diff line number Diff line change
@@ -15,6 +15,18 @@ target.appendChild(ele);
~~~
`}
/>

<Markdown
content={`
Append a new \`li\` to the end of a \`ul\`:

~~~ javascript
let newLi = document.createElement('li');
newLi.appendChild(document.createTextNode('text node inside li'));
document.querySelector('#myList').appendChild(newLi);
~~~
`}
/>
<RelatedPosts
slugs={[
'calculate-the-size-of-scrollbar',