@asamuzakjp/dom-selector
Advanced tools
Comparing version 0.12.3 to 0.12.5
@@ -45,3 +45,3 @@ { | ||
}, | ||
"version": "0.12.3" | ||
"version": "0.12.5" | ||
} |
@@ -22,2 +22,6 @@ /** | ||
const TEXT_NODE = 3; | ||
const UNIVERSAL_SELECTOR = { | ||
name: '*', | ||
type: TYPE_SELECTOR | ||
}; | ||
@@ -959,3 +963,3 @@ /* regexp */ | ||
if (HTML_FORM_INPUT.test(localName) || | ||
/^(?:f(?:ieldset|orm)|button|output)$/.test(localName)) { | ||
/^(?:f(?:ieldset|orm)|button)$/.test(localName)) { | ||
if (node.checkValidity()) { | ||
@@ -968,3 +972,3 @@ matched.push(node); | ||
if (HTML_FORM_INPUT.test(localName) || | ||
/^(?:f(?:ieldset|orm)|button|output)$/.test(localName)) { | ||
/^(?:f(?:ieldset|orm)|button)$/.test(localName)) { | ||
if (!node.checkValidity()) { | ||
@@ -1463,6 +1467,3 @@ matched.push(node); | ||
node.nodeType === ELEMENT_NODE) { | ||
const iteratorLeaf = { | ||
name: '*', | ||
type: TYPE_SELECTOR | ||
}; | ||
const iteratorLeaf = UNIVERSAL_SELECTOR; | ||
const iterator = this._createIterator(iteratorLeaf, node); | ||
@@ -1482,6 +1483,3 @@ let nextNode = iterator.nextNode(); | ||
PSEUDO_NTH.test(unescapeSelector(firstChild.name)))) { | ||
iteratorLeaf = { | ||
name: '*', | ||
type: TYPE_SELECTOR | ||
}; | ||
iteratorLeaf = UNIVERSAL_SELECTOR; | ||
} else { | ||
@@ -1544,2 +1542,5 @@ iteratorLeaf = children.shift(); | ||
} | ||
if (leaves.length === 1) { | ||
leaves.push(UNIVERSAL_SELECTOR); | ||
} | ||
const arr = this._matchCombinator(leaves, nextNode); | ||
@@ -1546,0 +1547,0 @@ if (!arr.length || arr.length === 1) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
68882
2025