@asamuzakjp/dom-selector
Advanced tools
Comparing version
@@ -53,3 +53,3 @@ { | ||
}, | ||
"version": "0.21.2" | ||
"version": "0.22.0" | ||
} |
@@ -101,6 +101,2 @@ /** | ||
[prefix, tagName] = selector.split('|'); | ||
if (prefix && prefix !== '*' && | ||
node && !isNamespaceDeclared(prefix, node)) { | ||
throw new DOMException(`invalid selector ${selector}`, SYNTAX_ERR); | ||
} | ||
} else { | ||
@@ -107,0 +103,0 @@ prefix = '*'; |
@@ -105,3 +105,3 @@ /** | ||
} else { | ||
throw new DOMException(`invalid selector ${selector}`, SYNTAX_ERR); | ||
throw new DOMException(`Invalid selector ${selector}`, SYNTAX_ERR); | ||
} | ||
@@ -120,3 +120,3 @@ return selector; | ||
if (/^$|^\s*>|,\s*$/.test(selector)) { | ||
throw new DOMException(`invalid selector ${selector}`, SYNTAX_ERR); | ||
throw new DOMException(`Invalid selector ${selector}`, SYNTAX_ERR); | ||
} | ||
@@ -123,0 +123,0 @@ let res; |
@@ -10,3 +10,2 @@ export class Matcher { | ||
_prepare(selector?: string): Array<Array<object | undefined>>; | ||
_throwOnPseudoElementSelector(astName: object): void; | ||
_collectNthChild(anb: { | ||
@@ -24,7 +23,8 @@ a: number; | ||
_matchAnPlusB(ast: object, node: object, nthName: string): object; | ||
_matchPseudoElementSelector(astName: string, opt?: object): void; | ||
_matchDirectionPseudoClass(ast: object, node: object): object | null; | ||
_matchLanguagePseudoClass(ast: object, node: object): object | null; | ||
_matchHasPseudoFunc(leaves: Array<object>, node: object): boolean; | ||
_matchLogicalPseudoFunc(astOpt: object, node: object): object | null; | ||
_matchPseudoClassSelector(ast: object, node: object): object; | ||
_matchLogicalPseudoFunc(astData: object, node: object): object | null; | ||
_matchPseudoClassSelector(ast: object, node: object, opt?: object): object; | ||
_matchAttributeSelector(ast: object, node: object): object | null; | ||
@@ -34,4 +34,4 @@ _matchClassSelector(ast: object, node: object): object | null; | ||
_matchTypeSelector(ast: object, node: object): object | null; | ||
_matchSelector(ast: object, node: object): object; | ||
_matchLeaves(leaves: Array<object>, node: object): boolean; | ||
_matchSelector(ast: object, node: object, opt: object): object; | ||
_matchLeaves(leaves: Array<object>, node: object, opt: object): boolean; | ||
_findDescendantNodes(leaves: Array<object>, baseNode: object): object; | ||
@@ -38,0 +38,0 @@ _matchCombinator(twig: object, node: object, opt?: { |
Sorry, the diff of this file is too big to display
98293
4.76%3040
4.97%