Skip to content

Commit 48a30d6

Browse files
committed
fix generateId comment
1 parent cd6710d commit 48a30d6

File tree

1 file changed

+4
-6
lines changed
  • packages/tswebextension/src/lib/mv2/background/tabs

1 file changed

+4
-6
lines changed

packages/tswebextension/src/lib/mv2/background/tabs/tabs-api.ts

+4-6
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,10 @@ export class TabsApi extends TabsApiCommon<FrameMV2, TabContext> {
115115
/**
116116
* Generates a "synthetic document id".
117117
*
118-
* Needed for Firefox where `parentDocumentId` and `documentId` are not supported.
118+
* Important: This workaround is needed for Firefox where `parentDocumentId` and `documentId` are not supported,
119+
* so a unique document ID is generated based on tab and frame IDs.
120+
* And in some cases it may not help, for example, frame's document can change (e.g. by navigating),
121+
* but the frame ID remains the same, so the *generated* document ID will be the same.
119122
*
120123
* @param tabId Tab ID.
121124
* @param frameId Frame ID.
@@ -129,11 +132,6 @@ export class TabsApi extends TabsApiCommon<FrameMV2, TabContext> {
129132
/**
130133
* Calculates document ID.
131134
*
132-
* Important: This workaround is needed for Firefox where `parentDocumentId` and `documentId` are not supported,
133-
* so a unique document ID is generated based on tab and frame IDs.
134-
* And in some cases it may not help, for example, frame's document can change (e.g. by navigating),
135-
* but the frame ID remains the same, so the *generated* document ID will be the same.
136-
*
137135
* @param tabId Tab ID.
138136
* @param frameId Frame ID.
139137
* @param documentId Document ID, may be undefined.

0 commit comments

Comments
 (0)