fix(zselector): do not use pseudo-element tag names as cues (#381)
They are not retrievable by querySelector().
This commit is contained in:
parent
4dc8693624
commit
98a6f001bb
|
|
@ -563,7 +563,8 @@ class Engine {
|
|||
appendCue(JSON.stringify(value), 'text', textScore, element, lca, value);
|
||||
}
|
||||
|
||||
appendCue(nodeName, 'tag', this.options.genericTagScore, element, lca, '');
|
||||
if (!nodeName.startsWith('<pseudo') && !nodeName.startsWith('::'))
|
||||
appendCue(nodeName, 'tag', this.options.genericTagScore, element, lca, '');
|
||||
if (this.options.imgAltScore && nodeName === 'IMG') {
|
||||
const alt = element.getAttribute('alt');
|
||||
if (alt)
|
||||
|
|
|
|||
Loading…
Reference in a new issue