Обновить js/DOM/Функции.md
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
|
||||
- Получить элемент. Его нет, возвращаем null
|
||||
|
||||
```js
|
||||
@@ -6,3 +5,11 @@ function getEl(el){
|
||||
return document.querySelector(el) ?? null;
|
||||
}
|
||||
```
|
||||
|
||||
- Загрузка скрипта после полной загрузки документа
|
||||
|
||||
```js
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
|
||||
})
|
||||
```
|
||||
Reference in New Issue
Block a user