0.1.4 • Published 1 year ago

@afoot/lineage v0.1.4

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

lineage

Traverse up the DOM tree to a specific parent or all the way up to body. Returns an array of DOM nodes. Especially useful for event handling and verifying currentTaraget elements are children of target parents.

usage

import (Lineage) from '@afoot/lineage';
const lineage = Lineage(document.querySelector('.foo'));
console.log(lineage); // Returns ['.foo','body']

license

MIT © Matthew Smith

made with ❤️ and ☕️ by

Niftiness Afoot! Matthew Smith