chrome.declarativeContent API to take actions depending on the
content of a page, without requiring permission to read the page's content.
- See https://developer.mozilla.org/en-US/docs/Web/API/ImageData.
- Matches the state of a web page by various criteria.
- Declarative event action that injects a content script. WARNING: This action is still experimental and is not supported on stable builds of Chrome.
Declarative event action that sets the n-dip square icon for the extension's $(ref:pageAction page
action) or $(ref:browserAction browser action) while the corresponding
conditions are met. This action can be used without host
permissions, but the extension
must have page or browser action.Exactly one of
pathmust be specified. Both are dictionaries mapping a number of pixels to an image representation. The image representation in
imageDatais anImageData object, for example from a
<canvas>element, while the image representation in
pathis the path to an image file relative to the extension's manifest. If
scalescreen pixels fit into a device-independent pixel, the
scale * nicon will be used. If that scale is missing, another image will be resized to the needed size.
- Declarative event action that shows the extension's $(ref:pageAction page action) while the corresponding conditions are met. This action can be used without host permissions, but the extension must have a page action. If the extension takes the activeTab permission, a click on the page action will grant access to the active tab.