CustomEvent.detail “tainted”?
问题 I'm developing a Chrome extension to add convenience to a website. I have access to the page's DOM, but I also need to interact with the "first-party" JS on that page, which I cannot do from my extension. I can inject arbitrary tags into the page (most notably also <script> tags), but since escaping strings like { html: '<div onclick="doSomething(this, \'someName\')"></div>' } is a real pain, I'd like to keep the injected code at an absolute minimum. I tried injecting event listeners into the