-
Notifications
You must be signed in to change notification settings - Fork 71
Open
Labels
supportive: chromeSupportive from ChromeSupportive from Chromesupportive: firefoxSupportive from FirefoxSupportive from Firefoxsupportive: safariSupportive from SafariSupportive from Safari
Description
Benefits/goals:
- Fixes inconsistency (Chrome doesn't do it, Firefox and Safari do).
- Makes the extension immediately usable.
- Simplifies code: no need for a nontrivial workaround that requires duplicating
matchesinhost_permissionsand doesn't supportexclude_matchesyet (#123). - Doesn't require reloading the tabs, which may lose their state (games, modern infinite-scroll pages).
- Solves a common pain point for new developers so they don't waste a lot of time in debugger/stackoverflow/etc.
Possible solutions:
"run_at": ["document_start", "extension_installed", "extension_enabled"]i.e. an alternative array syntax forrun_at"run_at_extension": ["installed", "enabled"]i.e. an additional key"run_at_installed": trueand"run_at_enabled": true"run_at_installed_or_enabled": true
Notes:
- In 1 and 2 the browser should disallow invalid/duplicate values.
- The solution should also apply to #600 e.g.
"extension_invoked"in 1,"invoked"in 2,"run_at_invoked"in 3 and 4. - Eventually this should be the default mode, but for now the current default behavior should be explicitly documented:
- MDN
content_scriptsshould copy the install note from MDN concepts. - MDN could add a row in the compat table or add a note about Chromium's behavior.
- Chrome
content_scripts.
- MDN
carlosjeurissen, xeenon, fregante, polywock, mrskiro and 2 more
Metadata
Metadata
Assignees
Labels
supportive: chromeSupportive from ChromeSupportive from Chromesupportive: firefoxSupportive from FirefoxSupportive from Firefoxsupportive: safariSupportive from SafariSupportive from Safari