You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/development/extensions/async.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ hide_table_of_contents: true
6
6
7
7
import {ExtensionCode} from './utils.js';
8
8
9
-
Sometimes you will want your extension to wait for an "asynchronous" or "async" operation to complete before resuming instead of for your block to complete (almost) immediately. A common example of this is making a request: no matter how fast your internet is, any network request is not going to be instant.
9
+
Sometimes you will want your extension to wait for an "asynchronous" or "async" operation to complete before resuming execution (versus resuming execution early and potentially causing problems). A common example of this is making a request: no matter how fast your internet is, any network request is not going to be instant.
10
10
11
11
Modern JavaScript has a cool utility for dealing with these: [Promises](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise). These are how your block can inform Scratch that your block is waiting for an async operation to complete, and the eventual value.
0 commit comments