Maxi Zelda

Results 5 comments of Maxi Zelda

> Try adding `if(root === undefined && window !== undefined) root = window;` right after `(function (root, factory) {` This seems to work for me 👍 However using babel-loader for...

with version `v3.0.0` try using a named import like this ``` import elementClosest from "element-closest"; elementClosest(window); ``` Also the `elementClosest(window);` is required to initialize the polyfill in Node (eg. with...

> const elementClosest = require('element-closest'); > elementClosest(window); // this is used to reference window.Element While confusing, this actually does the job. I think the docu and description are quite confusing...

Ups totally forgot to open the PR 🤦‍♂😅 Here we go :D https://github.com/jonathantneal/closest/pull/30