InjectionTarget constructor

InjectionTarget({
  1. required int tabId,
  2. List<int>? frameIds,
  3. List<String>? documentIds,
  4. bool? allFrames,
})

Implementation

InjectionTarget({
  /// The ID of the tab into which to inject.
  required int tabId,

  /// The
  /// [IDs](https://developer.chrome.com/extensions/webNavigation#frame_ids)
  /// of specific frames to inject into.
  List<int>? frameIds,

  /// The
  /// [IDs](https://developer.chrome.com/extensions/webNavigation#document_ids)
  /// of specific documentIds to inject into. This must not be set if
  /// `frameIds` is set.
  List<String>? documentIds,

  /// Whether the script should inject into all frames within the tab.
  /// Defaults
  /// to false.
  /// This must not be true if `frameIds` is specified.
  bool? allFrames,
}) : _wrapped = $js.InjectionTarget(
        tabId: tabId,
        frameIds: frameIds?.toJSArray((e) => e),
        documentIds: documentIds?.toJSArray((e) => e),
        allFrames: allFrames,
      );