Re: [csswg-drafts] [css-selectors] Query a parent node begining from a child node

You can already achieve this with the `element.closest()` method.

```js
el.querySelector('#add-subitem').addEventListener('click', e => {
  var li = e.target.closest('li');
});
```

-- 
GitHub Notification of comment by topaxi
Please view or discuss this issue at 
https://github.com/w3c/csswg-drafts/issues/612#issuecomment-254434094 
using your GitHub account

Received on Tuesday, 18 October 2016 07:56:03 UTC