@oscarpalmer/toretto 0.37.1 → 0.37.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/find/relative.js +2 -3
- package/dist/toretto.full.js +2 -3
- package/package.json +1 -1
package/dist/find/relative.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
function findAncestor(origin, selector) {
|
|
2
2
|
const element = getElement(origin);
|
|
3
3
|
if (element == null || selector == null) return null;
|
|
4
|
-
console.log(element);
|
|
5
4
|
if (typeof selector === "string") {
|
|
6
|
-
if (
|
|
7
|
-
return
|
|
5
|
+
if (Element.prototype.matches.call(element, selector)) return element;
|
|
6
|
+
return Element.prototype.closest.call(element, selector);
|
|
8
7
|
}
|
|
9
8
|
if (typeof selector !== "function") return null;
|
|
10
9
|
if (selector(element)) return element;
|
package/dist/toretto.full.js
CHANGED
|
@@ -658,10 +658,9 @@ const PROPERTY_DETAIL = "detail";
|
|
|
658
658
|
function findAncestor(origin, selector) {
|
|
659
659
|
const element = getElement(origin);
|
|
660
660
|
if (element == null || selector == null) return null;
|
|
661
|
-
console.log(element);
|
|
662
661
|
if (typeof selector === "string") {
|
|
663
|
-
if (
|
|
664
|
-
return
|
|
662
|
+
if (Element.prototype.matches.call(element, selector)) return element;
|
|
663
|
+
return Element.prototype.closest.call(element, selector);
|
|
665
664
|
}
|
|
666
665
|
if (typeof selector !== "function") return null;
|
|
667
666
|
if (selector(element)) return element;
|
package/package.json
CHANGED