-
Notifications
You must be signed in to change notification settings - Fork 23k
Correct/add destroy information on AI API pages #41712
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correct/add destroy information on AI API pages #41712
Conversation
nathanmemmott
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you this looks good to me with one comment!
| - : An {{domxref("AbortSignal")}} object instance, which allows the `create()` operation to be aborted via the associated {{domxref("AbortController")}}. | ||
| - : 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: | ||
| - If `abort()` is called before the `create()` promise resolves, the `create()` operation is cancelled. | ||
| - 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any further language detection activity will fail.
Here and elsewhere, I wonder if we should explain what this means? That ongoing calls will reject, as well as any further calls.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @nathanmemmott, this is a good point. I have spelled out explicitly what this means on the destroy() pages, and the create() page signal descriptions. I don't think I need to say more on the summary pages, as it is easy to click through to one of the ref pages if you want to know more.
pepelsbey
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Thank you :)
Description
As per #41610, the information on our AI API documentation pages relating to
destroy()/abort()is not accurate. This PR aims to fix this issue.cc @nathanmemmott. Can you give this a tech review?
Motivation
Additional details
Related issues and pull requests
Fixes #41610