Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider using insertCSS instead of the content scripts #847

Closed
ameshkov opened this issue Sep 6, 2017 · 2 comments
Closed

Consider using insertCSS instead of the content scripts #847

ameshkov opened this issue Sep 6, 2017 · 2 comments
Assignees
Milestone

Comments

@ameshkov
Copy link
Member

ameshkov commented Sep 6, 2017

In light of this change coming in future versions of Chromium, we should reconsider the way we inject CSS into the pages.

https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/tabs/insertCSS
https://developer.chrome.com/extensions/tabs#method-insertCSS

@ameshkov
Copy link
Member Author

ameshkov commented Sep 7, 2017

What impact will it have on Firefox and related browsers bcuz from what I gathered it's a chromium bug and the issues referenced here, in them you are saying will be automatically fixed by solving this issue.

  1. "user agent" stylesheets are already implemented in FF.
  2. Aside from the styles priority, the problem with applying CSS from the content script is timing -- it is applied when part of the DOM is already loaded and causes layout recalculation. insertCSS will eliminate this recalculation.

So, this chromium issue affects firefox also?

This is a common thing for all extensions which use WebExtensions save for Edge as insertCSS is kinda limited there.

@ameshkov
Copy link
Member Author

ameshkov commented Sep 7, 2017

@The-Commissioner that was a good question anyway, and thanks for the bug report!

@atropnikov atropnikov self-assigned this Sep 20, 2017
@ameshkov ameshkov modified the milestones: 3.0, 2.9 Feb 19, 2018
@zebrum zebrum closed this as completed Apr 10, 2018
@ameshkov ameshkov mentioned this issue Apr 23, 2018
Closed
adguard pushed a commit that referenced this issue Apr 20, 2021
Merge in EXTENSIONS/browser-extension from enhance/AG-7722 to master

* commit '2a207befbe02f367bf0647e36b5498f235b4ffc2':
  AG-7722 block third-party csp reports in chromium
  AG-7722 add CSP report request type
  AG-7722 block csp report requests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants