taoqf / node-html-parser

A very fast HTML parser, generating a simplified DOM, with basic element query support.
MIT License
1.12k stars 112 forks source link

There is something unreasonable about the attributes selector #201

Closed yeshaobin closed 2 years ago

yeshaobin commented 2 years ago
<view
      v-stat.click="qwe123"
      data-mp="qwe123|click"
      class="received-list">
</view>
image

It seems v-stat.click should be the attr but got v-stat and click . i want to get the element by the "v-stat.click" attribute selector ,but got null . please help me

Pomax commented 2 years ago

That looks like jQuery code, not node-html-parser code? And of course on a technical nitpicking note: <view> is not a valid HTML element, nor can it be a custom element (because those must have a dash in their tag), so if things are going wrong you may want to verify they go wrong on valid HTML first (anything that isn't, but happens to work, is just a bonus =)