ExtensionContext constructor

ExtensionContext({
  1. required ContextType contextType,
  2. required String contextId,
  3. required int tabId,
  4. required int windowId,
  5. String? documentId,
  6. required int frameId,
  7. String? documentUrl,
  8. String? documentOrigin,
  9. required bool incognito,
})

Implementation

ExtensionContext({
  /// The type of context this corresponds to.
  required ContextType contextType,

  /// A unique identifier for this context
  required String contextId,

  /// The ID of the tab for this context, or -1 if this context is not hosted
  /// in a tab.
  required int tabId,

  /// The ID of the window for this context, or -1 if this context is not
  /// hosted in a window.
  required int windowId,

  /// A UUID for the document associated with this context, or undefined if
  /// this context is hosted not in a document.
  String? documentId,

  /// The ID of the frame for this context, or -1 if this context is not
  /// hosted in a frame.
  required int frameId,

  /// The URL of the document associated with this context, or undefined if
  /// the context is not hosted in a document.
  String? documentUrl,

  /// The origin of the document associated with this context, or undefined if
  /// the context is not hosted in a document.
  String? documentOrigin,

  /// Whether the context is associated with an incognito profile.
  required bool incognito,
}) : _wrapped = $js.ExtensionContext(
        contextType: contextType.toJS,
        contextId: contextId,
        tabId: tabId,
        windowId: windowId,
        documentId: documentId,
        frameId: frameId,
        documentUrl: documentUrl,
        documentOrigin: documentOrigin,
        incognito: incognito,
      );