Skip to content

docs: clarify SPA navigation setup with locationWatcher.run()#2380

Open
mrumerf wants to merge 3 commits into
wxt-dev:mainfrom
mrumerf:patch-1
Open

docs: clarify SPA navigation setup with locationWatcher.run()#2380
mrumerf wants to merge 3 commits into
wxt-dev:mainfrom
mrumerf:patch-1

Conversation

@mrumerf
Copy link
Copy Markdown

@mrumerf mrumerf commented May 15, 2026

Added the missing ctx.locationWatcher.run() call to the SPA navigation example.

The wxt:locationchange event only fires after the location watcher is started, which was not previously shown in the documentation.

Overview

Adds the missing ctx.locationWatcher.run() call to the SPA navigation documentation and examples.

Previously, the docs showed how to listen for the wxt:locationchange event, but did not mention that the location watcher must first be started with ctx.locationWatcher.run(). Without this call, the event is never dispatched.

Manual Testing

  1. Follow the updated SPA documentation example.
  2. Add a console.log inside the wxt:locationchange listener.
  3. Navigate between routes in an SPA site.
  4. Verify that the event fires correctly after calling ctx.locationWatcher.run().

Related Issue

N/A

Added the missing `ctx.locationWatcher.run()` call to the
SPA navigation example.

The `wxt:locationchange` event only fires after the
location watcher is started, which was not previously
shown in the documentation.
@netlify
Copy link
Copy Markdown

netlify Bot commented May 15, 2026

Deploy Preview for creative-fairy-df92c4 ready!

Name Link
🔨 Latest commit d0835d3
🔍 Latest deploy log https://app.netlify.com/projects/creative-fairy-df92c4/deploys/6a082b8661c1d20008ee5ba8
😎 Deploy Preview https://deploy-preview-2380--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.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 15, 2026

Open in StackBlitz

@wxt-dev/analytics

npm i https://pkg.pr.new/@wxt-dev/analytics@2380

@wxt-dev/auto-icons

npm i https://pkg.pr.new/@wxt-dev/auto-icons@2380

@wxt-dev/browser

npm i https://pkg.pr.new/@wxt-dev/browser@2380

@wxt-dev/i18n

npm i https://pkg.pr.new/@wxt-dev/i18n@2380

@wxt-dev/is-background

npm i https://pkg.pr.new/@wxt-dev/is-background@2380

@wxt-dev/module-react

npm i https://pkg.pr.new/@wxt-dev/module-react@2380

@wxt-dev/module-solid

npm i https://pkg.pr.new/@wxt-dev/module-solid@2380

@wxt-dev/module-svelte

npm i https://pkg.pr.new/@wxt-dev/module-svelte@2380

@wxt-dev/module-vue

npm i https://pkg.pr.new/@wxt-dev/module-vue@2380

@wxt-dev/runner

npm i https://pkg.pr.new/@wxt-dev/runner@2380

@wxt-dev/storage

npm i https://pkg.pr.new/@wxt-dev/storage@2380

@wxt-dev/unocss

npm i https://pkg.pr.new/@wxt-dev/unocss@2380

@wxt-dev/webextension-polyfill

npm i https://pkg.pr.new/@wxt-dev/webextension-polyfill@2380

wxt

npm i https://pkg.pr.new/wxt@2380

commit: d0835d3

docs: fix formatting
Copy link
Copy Markdown
Author

@mrumerf mrumerf left a comment

Choose a reason for hiding this comment

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

Applied the required formatting fixes and updated the PR.

@mrumerf mrumerf removed their assignment May 16, 2026
@PatrykKuniczak
Copy link
Copy Markdown
Collaborator

Applied the required formatting fixes and updated the PR.

Still doesn't work

@codecov
Copy link
Copy Markdown

codecov Bot commented May 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.41%. Comparing base (344d14d) to head (d0835d3).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2380      +/-   ##
==========================================
+ Coverage   78.36%   78.41%   +0.05%     
==========================================
  Files         133      133              
  Lines        3882     3882              
  Branches      875      875              
==========================================
+ Hits         3042     3044       +2     
+ Misses        751      750       -1     
+ Partials       89       88       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

2 participants