Retitle snippets
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
---
|
||||
title: getAncestors
|
||||
title: Get element ancestors
|
||||
tags: browser,beginner
|
||||
firstSeen: 2020-10-15T09:28:34+03:00
|
||||
lastUpdated: 2021-01-05T22:45:34+02:00
|
||||
@ -22,6 +22,6 @@ const getAncestors = el => {
|
||||
```
|
||||
|
||||
```js
|
||||
getAncestors(document.querySelector('nav'));
|
||||
getAncestors(document.querySelector('nav'));
|
||||
// [document, html, body, header, nav]
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user