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

valid() method does not conform to spec #88

Closed pricemi115 closed 3 years ago

pricemi115 commented 3 years ago

According to the documentation, the .valid method will return the root element if the data are valid and false otherwise. Instead, when the data are indeed valid, the function is returning 'true', not the 'root element'. I did not test the 'false' condition, presumably that is working fine.

taoqf commented 3 years ago

Thank you. already changed document.