This object contains details specifying the injection target for CSS and JavaScript. Its used in scripting.executeScript(), scripting.insertCSS(), and scripting.removeCSS().
This object contains details specifying the injection target for CSS and JavaScript. Its used in scripting.executeScript(), scripting.insertCSS(), and scripting.removeCSS().
Values of this type are objects. They contain these properties:
allFrames Optional
boolean. Whether the script or CSS is injected into all frames within the tab. Defaults to false. Cannot be true if frameIds is specified.
frameIds Optional
array of number. Array of the IDs of the frames to inject into.
tabIdnumber. The ID of the tab to inject into.
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
InjectionTarget |
88 | 88 | 102 | ? | 74 | 15.4Available for use in Manifest V2 or later. |
? | ? | 102 | ? | 15.4Available for use in Manifest V2 or later. |
? |
Note: This API is based on Chromium's chrome.scripting API.
© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/scripting/InjectionTarget