0.0.1 • Published 7 years ago
get-descendant v0.0.1
get-descendant
Get parent (child element of target)
Install or Download
yarn add get-descendant
npm i -S get-descendant
Example
<div id="target">
<div id="expected">
<div>
<div id="el">
</div>
</div>
</div>
</div>
<script>
const result = getDescendant(
document.getElementById('el'),
document.getElementById('target')
);
console.log(result); // <div id="expected"/>
</script>
LICENSE
The MIT License (MIT)
Copyright (c) 2017 nju33 nju33.ki@gmail.com
0.0.1
7 years ago