将Google Chrome升级到版本63.0.3239.84后,我开始收到错误和警告

时间:2017-12-16 05:45:34

标签: google-chrome dom console warnings

将Google Chrome升级到版本63.0.3239.84后,我开始在控制台中收到错误和警告,例如:

[DOM] Found 3 elements with non-unique id #SMTPSetting:
[DOM] Input elements should have autocomplete attributes (suggested: "current-password"):
[Violation] Added non-passive event listener to a scroll-blocking 'mousewheel' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952 

2 个答案:

答案 0 :(得分:26)

只需将autocomplete属性添加到输入中,警告就会消失。例如:

<div class="form-group">
    <input type="email" class="form-control" autocomplete="email" required>
    <input type="password" class="form-control" autocomplete="password" required>
</div>

如果您没有或者根本不想为属性autocomplete设置值,请使用autocomplete="foo",以便警告消息消失。

有关详情,请访问:https://chromereleases.googleblog.com/2017/12/stable-channel-update-for-desktop.html

答案 1 :(得分:1)

他们似乎最近添加了此选项,隐藏了建议: -source:推荐 在过滤器框中。

偶然发现它。过滤器框还支持使用Ctrl + Space(Windows)自动完成。