Why does calling Window.scroll() give a trusted event?
问题 I have a Chrome extension that needs to produce human-like mouse and keyboard behavior (specifically, generate events that have a isTrusted value of true ). I can do everything I need except for scrolling with the chrome.debugger APIs. But it seems that the Window.scroll() method is sufficient for this purpose up to Chrome 52 and Firefox 48.0a1. This can be observed by attaching an event listener to the page as follows: document.addEventListener("scroll", function (event) { console.log("event