1. 前端Console报错信息
Uncaught SecurityError: Blocked a frame with origin "https://www.baidu.com" from accessing a frame with origin "http://localhost:8080". The frame requesting access has a protocol of "https", the frame being accessed has a protocol of "http". Protocols must match.
chrome-extension://eobojkjbpolpnaolkijihjkpmhieijhb/js/content.js:7 [Sun Mar 31 2019 13:16:34 GMT+0800 (中国标准时间)][content.js][ 785]Enter content.js, contentId = 785
2. 原因
iframe 的 src = "https://www.baidu.com"
,而被请求的路径为 http://localhost:8080
,其中 https 协议与 http 不匹配。