Closed yads closed 3 years ago
Great suggestion. I would definitely take that PR!
It may even be worth it to make a breaking change in a future major version to use innerText
instead. chai-dom
started out in 2015 before Firefox supported innerText
.
Awesome @nathanboktae I'll put it together for you. I guess for the moment I'll add the rendered
option?
Yup the rendered
option so we can immediately use it would be best,
thanks.
On Fri, Feb 19, 2021 at 3:52 PM Vadim Kazakov notifications@github.com wrote:
Awesome @nathanboktae https://github.com/nathanboktae I'll put it together for you. I guess for the moment I'll add the rendered option?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nathanboktae/chai-dom/issues/48#issuecomment-782462337, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAPFVV7AXFJJM3DYTPXUISTS732T7ANCNFSM4X2W5SFA .
Fixed by #50
Consider the following HTML:
The textContent of the div would be
"\n foo\n bar\n"
, however the actual rendered text that's likely relevant is just"foo bar"
. Is there an appetite to switch the text matcher to use innerText or at least provide an option to use it instead of textContent maybe something like the following?I can put together a PR for this if this is something you're interested in supporting @nathanboktae