scripting.InjectionTarget

This object contains details specifying the injection target for CSS and JavaScript. Its used in scripting.executeScript(), scripting.insertCSS(), and scripting.removeCSS().

Type

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.

tabId

number. The ID of the tab to inject into.

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Firefox for Android
Safari on iOS
InjectionTarget
Chrome – Full support
Chrome 88 (Release date: 2021-01-19)
footnote Full support
Edge – Full support
Edge 88 (Release date: 2021-01-21)
footnote Full support
Firefox – Full support
Firefox 102 (Release date: 2022-06-28)
footnote Full support
Opera – Full support
Opera 74 (Release date: 2021-02-02)
footnote Full support
Safari – Full support
Safari 15.4 (Release date: 2022-03-14)
footnote Full support
Firefox for Android – Full support
Firefox for Android 102 (Release date: 2022-06-28)
footnote Full support
Safari on iOS – Full support
Safari on iOS 15.4 (Release date: 2022-03-14)
footnote Full support

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support

Note: This API is based on Chromium's chrome.scripting API.