Unexpected double injection using RequestContentScript
Reported by
alexpign...@gmail.com,
Oct 18
|
||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3580.0 Safari/537.36 Steps to reproduce the problem: 1. Put bg.js, inject.js, manifest.json in a directory 2. Load an Unpacked extension from chrome://extensions 3. Put test.html in a directory and start an HTTP server there (for example on port 8080) 4. Visit http://127.0.0.1:8080/test.html What is the expected behavior? On the dev tools console the line INJECT should appear only once What went wrong? The line INJECT appear twice Did this work before? No Does this work in other browsers? N/A Chrome version: 72.0.3580.0 Channel: n/a OS Version: Flash Version: It is my understanding that an injected script should be executed only once in a given page. This test case shows that if another, independent, rule matches in page the injection happens twice. In this case if there is a <p> element a SetIcon action is triggered. If there is no <p> in the page the SetIcon action does not trigger and the script is injected only once.
,
Dec 14
declarativeContent.RequestContentScript is still experimental, and is likely to change in the future. I'll mark this as available, since it should be fixed if it launches in this same form. |
||
►
Sign in to add a comment |
||
Comment 1 by dtapu...@chromium.org
, Dec 11Status: Untriaged (was: Unconfirmed)