webNavigation Permission

2 min read

webNavigation Permission

What It Grants

Access to the chrome.webNavigation API for monitoring page navigation lifecycle across all tabs and frames.

Manifest

{
  "permissions": ["webNavigation"]
}

User Warning

None — this permission does not trigger a warning at install time.

API Access

When granted, you can use all chrome.webNavigation events:

URL Filtering

chrome.webNavigation.onCompleted.addListener(
  (details) => { /* only matching URLs */ },
  { url: [{ hostSuffix: '.github.com' }, { urlPrefix: 'https://docs.google.com/' }] }
);

Key Properties

Each event provides:

When to Use

When NOT to Use

Runtime Check

import { checkPermission } from '@theluckystrike/webext-permissions';
const granted = await checkPermission('webNavigation');

Cross-References

Frequently Asked Questions

How do I track page navigations?

Use chrome.webNavigation API to receive events when frames navigate, complete loading, or encounter errors.

Can I block navigations with webNavigation?

No, webNavigation is for tracking only. To block or modify navigations, use declarativeNetRequest or webRequest. —

Part of the Chrome Extension Guide by theluckystrike. Built at zovo.one.

No previous article
No next article