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

Add content scripts section in specification #542

Merged
merged 16 commits into from
Feb 27, 2025
Merged

Conversation

oliverdunk
Copy link
Member

@oliverdunk oliverdunk commented Feb 9, 2024

Adds a first draft of information on content scripts in the specification.

There are still some updates needed, in particular around the algorithm for deciding when to inject a script, but I wanted to open something to get some early feedback.


Preview | Diff (Both outdated!)

Copy link
Collaborator

@rdcronin rdcronin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, Oliver! I had a chance to take a quick pass on this one.

Copy link

@jpmedley jpmedley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the extra review. I didn't remember that I had looked at this already until I got to my first comment halfway through it.

@Rob--W
Copy link
Member

Rob--W commented Apr 26, 2024

Although not obvious from Github's UI, I just posted additional context on match_about_blank and match_origin_as_fallback:

Copy link
Member Author

@oliverdunk oliverdunk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks all! I've just done another pass on this, would appreciate any additional feedback.

@oliverdunk
Copy link
Member Author

@Rob--W, I've addressed all of the actionable feedback here. Could you take another look?

Copy link
Member

@Rob--W Rob--W left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I read through it all and considered approving, but then I reached the final section on the algorithm, and since that is inaccurate, I'd like to resolve that before merging.

Copy link
Member

@Rob--W Rob--W left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@oliverdunk and I sat together and drafted an updated algorithm that more closely resembles the behavior of Chrome and Firefox. (not Safari because it does not support match_about_blank yet).

We still need to define how to get a precursor origin somehow; ideally that would be in a different spec.

Copy link
Member

@Rob--W Rob--W left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving to signal that I'm content with the technical accuracy of the document. What remains before merging is formatting so that the spec can render as expected.

Would also be nice to have the "precursor origin" specified somewhere (ideally somewhere not extension-specific because it is a generic concept), but that is not a blocker to merging.

@oliverdunk
Copy link
Member Author

I've updated the formatting following Rob's comment. While CI is passing on this PR, it seems like the preview URL still isn't getting updated. You can find the latest version here: https://github.com/w3c/webextensions/actions/runs/13334183668/artifacts/2594066705

Copy link
Collaborator

@rdcronin rdcronin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM; thank you!

@oliverdunk oliverdunk dismissed dotproto’s stale review February 24, 2025 11:07

Remaining comments were non-blockers / FYI.

@oliverdunk oliverdunk merged commit e393c3f into main Feb 27, 2025
4 checks passed
@oliverdunk oliverdunk deleted the spec-content-scripts branch February 27, 2025 16:03
github-actions bot added a commit that referenced this pull request Feb 27, 2025
SHA: e393c3f
Reason: push, by oliverdunk

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions bot added a commit that referenced this pull request Feb 27, 2025
SHA: e393c3f
Reason: push, by oliverdunk

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions bot added a commit that referenced this pull request Feb 27, 2025
SHA: e393c3f
Reason: push, by oliverdunk

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants