MDN self-hosted library · e01.org

scripting.InjectionTarget

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

no runnable cells webextension-api-type upstream source

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
  • : boolean. Whether the script or CSS is injected into all frames within the tab. Defaults to false. Cannot be true if frameIds is specified.

  • documentIds

  • : array of string. The IDs of the documents to inject into. Must not be specified if frameIds is set. See the Work with documentId article for more information.

  • frameIds

  • : array of number. Array of the IDs of the frames to inject into. Must not be specified if documentIds is set.

  • tabId

  • : number. The ID of the tab to inject into.

Browser compatibility

[!NOTE] This API is based on Chromium's chrome.scripting API.