Deprecate utility tag

This commit is contained in:
Angelos Chalaris
2020-04-16 23:07:33 +03:00
parent 5e42f0aaa4
commit e31aea403d
60 changed files with 118 additions and 117 deletions

View File

@ -1,13 +1,13 @@
---
title: createElement
tags: browser,utility,beginner
tags: browser,beginner
---
Creates an element from a string (without appending it to the document).
Creates an element from a string (without appending it to the document).
If the given string contains multiple elements, only the first one will be returned.
Use `document.createElement()` to create a new element.
Set its `innerHTML` to the string supplied as the argument.
Set its `innerHTML` to the string supplied as the argument.
Use `ParentNode.firstElementChild` to return the element version of the string.
```js
@ -25,4 +25,4 @@ const el = createElement(
</div>`
);
console.log(el.className); // 'container'
```
```