Update snippet descriptions
This commit is contained in:
@ -5,10 +5,11 @@ tags: browser,beginner
|
||||
|
||||
Inserts an HTML string after the end of the specified element.
|
||||
|
||||
- Use `el.insertAdjacentHTML()` with a position of `'afterend'` to parse `htmlString` and insert it after the end of `el`.
|
||||
- Use `Element.insertAdjacentHTML()` with a position of `'afterend'` to parse `htmlString` and insert it after the end of `el`.
|
||||
|
||||
```js
|
||||
const insertAfter = (el, htmlString) => el.insertAdjacentHTML('afterend', htmlString);
|
||||
const insertAfter = (el, htmlString) =>
|
||||
el.insertAdjacentHTML('afterend', htmlString);
|
||||
```
|
||||
|
||||
```js
|
||||
|
||||
Reference in New Issue
Block a user