diff options
| author | Andrew <saintruler@gmail.com> | 2019-07-08 13:29:53 +0400 |
|---|---|---|
| committer | Andrew <saintruler@gmail.com> | 2019-07-08 13:29:53 +0400 |
| commit | d48c3ccb5e273730d2643366ecd6aa0dcb22e6f4 (patch) | |
| tree | 913bfd818395d1a0aa1ff8835b282e529f8cdafa /day9/task5/static/js/utils.js | |
| parent | 67c4adc2d26714ff5c5269be220fff90cec47353 (diff) | |
Рефакторинг javascript файла.
Diffstat (limited to 'day9/task5/static/js/utils.js')
| -rw-r--r-- | day9/task5/static/js/utils.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/day9/task5/static/js/utils.js b/day9/task5/static/js/utils.js new file mode 100644 index 0000000..5d60723 --- /dev/null +++ b/day9/task5/static/js/utils.js @@ -0,0 +1,5 @@ +function elementFromHTML(html) { + let elem = document.createElement('div'); + elem.innerHTML = html; + return elem.firstChild; +} |