タイトル: 同期処理
これはJavascriptの同期処理に関する記事です。
| 例文 |
|---|
|
var request = new XMLHttpRequest(); //リクエストが成功した場合 |
同期処理を行うとChromeブラウザで以下の警告が出る。
| 警告 |
|---|
| [Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/. |
要約するとメインスレッドでの同期処理は廃棄予定とのこと。