最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Change in the way textContent returns text with carriage return in DOMParser in Chromium - Stack Overflow

programmeradmin0浏览0评论

Recently I noticed a change in the way DOMParser created XMLDocuments returned text with carriage returns in textContent. Namely, carriage returns are not longer being returned in textContent.

On the left is version 120.0.6095.0 of Chromium. On the right is version 132.0.6834.162 of Chrome. The behaviour on the right is seen in Edge as well.

The behaviour on the left was the same as what was happening last year but it appears that it has recently changed to the right. I was trying to look for when this change occurred but could not find it. I wonder if anyone out there knows the reason for this change? (My assumption is that the new behaviour is to make it follow the spec?)

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论