Skip to content

feat: support SPA content scripts#2489

Open
Develop-KIM wants to merge 1 commit into
wxt-dev:mainfrom
Develop-KIM:feat/spa-content-scripts
Open

feat: support SPA content scripts#2489
Develop-KIM wants to merge 1 commit into
wxt-dev:mainfrom
Develop-KIM:feat/spa-content-scripts

Conversation

@Develop-KIM

Copy link
Copy Markdown

Fixes #1029

Summary

  • Add an experimental spa option for isolated world content scripts.
  • Register SPA content scripts at origin scope while filtering against the original match patterns at runtime.
  • Restart the content script context on matching SPA navigations and abort it when navigating away.
  • Add validation and tests for SPA matching and unsupported MAIN world usage.

Verification

  • bun run --filter wxt check
  • bun run --filter wxt test content-scripts validation spa-content-script
  • git diff --check

Disclosure

This contribution was prepared with AI assistance and reviewed before submission.

Co-Authored-By: openai-codex <noreply@openai.com>
@Develop-KIM Develop-KIM requested a review from aklinker1 as a code owner July 9, 2026 16:56
@netlify

netlify Bot commented Jul 9, 2026

Copy link
Copy Markdown

Deploy Preview for creative-fairy-df92c4 ready!

Name Link
🔨 Latest commit 8570e72
🔍 Latest deploy log https://app.netlify.com/projects/creative-fairy-df92c4/deploys/6a4fd2cf5b192d00082ed1df
😎 Deploy Preview https://deploy-preview-2489--creative-fairy-df92c4.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions Bot added the pkg/wxt Includes changes to the `packages/wxt` directory label Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg/wxt Includes changes to the `packages/wxt` directory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Built-in support for Content Scripts running in SPAs

1 participant