Declarative Content
declarativeContentTechnical 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.declarativeContentCommon 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
Storage
storageThis acts as a digital filing cabinet where the extension saves your personal settings and preferences. It ensures your custom configurations stay the same every time you open Chrome without slowing down your computer.
Unlimited Storage
unlimitedStorageThe extension can save more data on your computer than the usual limit allows. This is useful for tools that need to work offline or save lots of information locally.
Alarms
alarmsThe extension can set timers to perform tasks at specific times or on a regular schedule. This allows features like periodic sync, reminders, or scheduled updates to work reliably.
Idle Detection
idleThe extension can tell if you are actively using your computer or have stepped away. This helps it avoid interrupting you or save resources when you are not at your desk.
Power Management
powerThe extension can keep your screen awake and prevent your computer from going to sleep. This is helpful when watching videos or during presentations.