Skip to content

Commit ec6458b

Browse files
Clarify what fail means after destroy() or abort
1 parent 7c78f73 commit ec6458b

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

files/en-us/web/api/languagedetector/create_static/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ LanguageDetector.create(options)
3232
- `signal` {{optional_inline}}
3333
- : An {{domxref("AbortSignal")}} object instance, which allows a `create()` operation to be aborted via the associated {{domxref("AbortController")}}. The exact effect is dependant on when {{domxref("AbortController.abort()")}} is called:
3434
- If `abort()` is called before the `create()` promise resolves, the `create()` operation is cancelled.
35-
- If `abort()` is called after the `create()` promise fulfills, it has the same effect as calling {{domxref("LanguageDetector.destroy()")}}: The resources assigned to the resulting `LanguageDetector` instance are released, and any further language detection activity will fail.
35+
- If `abort()` is called after the `create()` promise fulfills, it has the same effect as calling {{domxref("LanguageDetector.destroy()")}}: The resources assigned to the resulting `LanguageDetector` instance are released, and any ongoing and subsequent `LanguageDetector` method calls will reject with an `AbortError`.
3636

3737
### Return value
3838

files/en-us/web/api/languagedetector/destroy/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ browser-compat: api.LanguageDetector.destroy
1010

1111
{{APIRef("Translator and Language Detector APIs")}}{{SeeCompatTable}}{{securecontext_header}}
1212

13-
The **`destroy()`** method of the {{domxref("LanguageDetector")}} interface releases the resources assigned to the `LanguageDetector` instance it is called on and stops any further activity on it.
13+
The **`destroy()`** method of the {{domxref("LanguageDetector")}} interface releases the resources assigned to the `LanguageDetector` instance it is called on and stops any further activity on it. This means that any ongoing and subsequent method calls made on the `LanguageDetector` will reject with an `AbortError`.
1414

1515
It makes sense to destroy `LanguageDetector` objects if they are no longer being used, as they tie up significant resources in their handling.
1616

files/en-us/web/api/summarizer/create_static/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Summarizer.create(options)
4343
- `signal`
4444
- : An {{domxref("AbortSignal")}} object instance, which allows a `create()` operation to be aborted via the associated {{domxref("AbortController")}}. The exact effect is dependant on when {{domxref("AbortController.abort()")}} is called:
4545
- If `abort()` is called before the `create()` promise resolves, the `create()` operation is cancelled.
46-
- If `abort()` is called after the `create()` promise fulfills, it has the same effect as calling {{domxref("Summarizer.destroy()")}}: The resources assigned to the resulting `Summarizer` instance are released, and any further summarizing activity will fail.
46+
- If `abort()` is called after the `create()` promise fulfills, it has the same effect as calling {{domxref("Summarizer.destroy()")}}: The resources assigned to the resulting `Summarizer` instance are released, and any ongoing and subsequent `Summarizer` method calls will reject with an `AbortError`.
4747
- `type`
4848
- : An enumerated value specifying the {{domxref("Summarizer.type", "type")}} of summary you want this `Summarizer` to generate. Defaults to `key-points`.
4949

files/en-us/web/api/summarizer/destroy/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ browser-compat: api.Summarizer.destroy
1010

1111
{{APIRef("Summarizer API")}}{{SeeCompatTable}}{{securecontext_header}}
1212

13-
The **`destroy()`** method of the {{domxref("Summarizer")}} interface releases the resources assigned to the `Summarizer` instance it is called on and stops any further activity on it.
13+
The **`destroy()`** method of the {{domxref("Summarizer")}} interface releases the resources assigned to the `Summarizer` instance it is called on and stops any further activity on it. This means that any ongoing and subsequent method calls made on the `Summarizer` will reject with an `AbortError`.
1414

1515
It makes sense to destroy `Summarizer` objects if they are no longer being used, as they tie up significant resources in their handling.
1616

files/en-us/web/api/translator/create_static/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Translator.create(options)
3434
- `signal` {{optional_inline}}
3535
- : An {{domxref("AbortSignal")}} object instance, which allows a `create()` operation to be aborted via the associated {{domxref("AbortController")}}. The exact effect is dependant on when {{domxref("AbortController.abort()")}} is called:
3636
- If `abort()` is called before the `create()` promise resolves, the `create()` operation is cancelled.
37-
- If `abort()` is called after the `create()` promise fulfills, it has the same effect as calling {{domxref("Translator.destroy()")}}: The resources assigned to the resulting `Translator` instance are released, and any further translation activity will fail.
37+
- If `abort()` is called after the `create()` promise fulfills, it has the same effect as calling {{domxref("Translator.destroy()")}}: The resources assigned to the resulting `Translator` instance are released, and any ongoing and subsequent `Translator` method calls will reject with an `AbortError`.
3838

3939
### Return value
4040

files/en-us/web/api/translator/destroy/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ browser-compat: api.Translator.destroy
1010

1111
{{APIRef("Translator and Language Detector APIs")}}{{SeeCompatTable}} {{securecontext_header}}
1212

13-
The **`destroy()`** method of the {{domxref("Translator")}} interface releases the resources assigned to the `Translator` instance it is called on and stops any further activity on it.
13+
The **`destroy()`** method of the {{domxref("Translator")}} interface releases the resources assigned to the `Translator` instance it is called on and stops any further activity on it. This means that any ongoing and subsequent method calls made on the `Translator` will reject with an `AbortError`.
1414

1515
It makes sense to destroy `Translator` objects if they are no longer being used, as they tie up significant resources in their handling.
1616

0 commit comments

Comments
 (0)