Declarative Content

declarativeContent
Low RiskCategory: System & PerformanceView Official Docs

Technical Context

Provides access to the chrome.declarativeContent API for taking actions based on page content without requiring host permissions. This enables efficient, declarative rules for page-based actions.

What This Means For You

The extension can show or hide its icon based on the page you are viewing, without needing to read the page content. This is a privacy-respecting way to activate on specific sites.

Related APIs

This permission enables access to these Chrome APIs:

chrome.declarativeContent

Common Use Cases

  • Context-aware extensions
  • Site-specific tools

How to Declare in manifest.json

Add the "declarativeContent" permission to your extension manifest:

{
  "manifest_version": 3,
  "name": "My Extension",
  "permissions": [
    "declarativeContent"
  ]
}

Related Permissions