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

Content script injection inconsistencies in the sidePanel #616

Open
grahamlangford opened this issue May 16, 2024 · 2 comments
Open

Content script injection inconsistencies in the sidePanel #616

grahamlangford opened this issue May 16, 2024 · 2 comments
Labels
needs-triage: chrome Chrome needs to assess this issue for the first time needs-triage: firefox Firefox needs to assess this issue for the first time neutral: safari Not opposed or supportive from Safari

Comments

@grahamlangford
Copy link

grahamlangford commented May 16, 2024

Context

  • The behavior of content script injection in side panels is inconsistent between Chrome and Edge
    • In Chrome, the extension's content script is automatically injected
      image

    • In Edge, the extension's content script is not injected
      image

Related Discussions

@github-actions github-actions bot added needs-triage: chrome Chrome needs to assess this issue for the first time needs-triage: firefox Firefox needs to assess this issue for the first time needs-triage: safari Safari needs to assess this issue for the first time labels May 16, 2024
@twschiller
Copy link

twschiller commented May 16, 2024

For reference, the manifest for the content script is:

    {
      "matches": ["*://*/*"],
      "exclude_matches": ["https://*.googleapis.com/*"],
      "js": ["contentScript.js"],
      "css": ["contentScript.css"],
      "all_frames": true,
      "match_about_blank": true,
      "run_at": "document_idle"
    },

In the sidebar, we need to iframe some 3rd party content. The structure we use is:

  • Top: our extension side panel page
    • frame.html: A shim extension frame around the 3rd party frame (adjusting some CSP, etc.)
      • The 3rd party frame (which itself might have iframes)

Our assumption is the expected behavior is the Chrome behavior - that the content script is injected into frames within the sidebar?

@tophf
Copy link

tophf commented May 16, 2024

Might be helpful to clarify that you mean the extension's own content script and indeed you and Chrome are correct here because how else the extension would be able to scrape a web site embedded in its page?

@xeenon xeenon added neutral: safari Not opposed or supportive from Safari and removed needs-triage: safari Safari needs to assess this issue for the first time labels Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage: chrome Chrome needs to assess this issue for the first time needs-triage: firefox Firefox needs to assess this issue for the first time neutral: safari Not opposed or supportive from Safari
Projects
None yet
Development

No branches or pull requests

4 participants