UNPKG

spur-events

Version:

Cross-browser & cross-platform event system based on the PointerEvent API.

20 lines (16 loc) 334 B
var core = require('./core.js'); var window = core.window; function getPath(element) { var path = []; while (element !== null) { path.push(element); element = element.host || element.parentNode || null; } if (element !== window) { path.push(window); } return path; } module.exports = { getPath: getPath };