【问题】
浏览器调试的时候经常会用到console,粘贴内容进console控制台会报错,严重影响调试效率。
报错内容如下:
Warning: Don’t paste code into the DevTools Console that you don’t understand or haven’t reviewed yourself. This could allow attackers to steal your identity or take control of your computer. Please type ‘allow pasting’ below and hit Enter to allow pasting.
【问题处理】
方法一:
直接在console控制台手动输入:allow pasting
回车即可成功设置允许粘贴。
方法二:
1、点击 开发人员工具(DevTools) 右边上方齿轮(设置);
2、Settings -> Experiments -> Filter 输入 Paste
3、取消勾选 Show warning about Self-XSS when pasting
4、重启Chrome