On a page I'm doing I will be ending up with custom link
elements like this:
<link rel="multiply" type="service/math" src="path/to/service">
<link rel="substract" type="service/math" src="path/to/service">
...
I'm trying to use querySelectorAll
to retrieve all link elements with a type service/...
specified and am getting nowhere.
Currently I'm selecting this:
root.querySelectorAll('link');
which gives me all <link>
elements when I only want the ones with type service/.*
Questions:
Can I add a regex to a QSA selector? If so, how to do it?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…