{"id":267190,"date":"2015-10-30T18:13:02","date_gmt":"2015-10-30T15:13:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=267190"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=267190","title":{"rendered":"\u0423\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u0435 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043d\u0430 JavaScript \u0441 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0435\u043c \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438\u0437 ES2016"},"content":{"rendered":"<p>       \u0425\u043e\u0442\u044f \u043c\u044b \u0435\u0449\u0435 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c <a href=\"http:\/\/blogs.windows.com\/msedgedev\/2015\/05\/12\/javascript-moves-forward-in-microsoft-edge-with-ecmascript-6-and-beyond\/\">\u0440\u0430\u0431\u043e\u0442\u0443 \u043d\u0430\u0434 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0435\u043c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 ES6\/2015<\/a>, \u043a\u043e\u043c\u0430\u043d\u0434\u0430 Chackra \u0442\u0430\u043a\u0436\u0435 \u0441\u043c\u043e\u0442\u0440\u0438 \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u044b ES2016 \u0438, \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u043d\u0430 <a href=\"https:\/\/dev.modern.ie\/platform\/status\/asyncfunctionses2016\/\">\u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/a>. \u041c\u044b \u0440\u0430\u0434\u044b \u043e\u0431\u044a\u044f\u0432\u0438\u0442\u044c \u043e\u0431 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0435 async-\u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0432 Microsoft Edge, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441\u043e \u0441\u0431\u043e\u0440\u043a\u0438 <a href=\"https:\/\/dev.modern.ie\/platform\/changelog\/desktop\/10547\/\">Microsoft Edge (EdgeHTML 13.10547)<\/a>.<\/p>\n<p>  <iframe loading=\"lazy\" src=\"https:\/\/channel9.msdn.com\/Blogs\/Seth-Juarez\/Async-Functions-in-JavaScript-with-Etienne-Baudoux\/player\" width=\"640\" height=\"360\"><\/iframe><br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h2>\u0410\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432 ES7\/ES2016<\/h2>\n<p>  \u041a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0441\u043b\u043e\u0432\u0430 <b>async<\/b> \u0438 <b>await<\/b>, \u043a\u0430\u043a \u0447\u0430\u0441\u0442\u044c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u043e \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044e \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u043d\u0430\u0446\u0435\u043b\u0435\u043d\u044b \u043d\u0430 \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430. \u042d\u0442\u043e \u043e\u0434\u043d\u0430 \u0438\u0437 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e C# \u0438 <a href=\"https:\/\/wpdev.uservoice.com\/forums\/257854-microsoft-edge-developer\/suggestions\/8511262-es7-async-await\">\u0447\u0430\u0441\u0442\u043e \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c\u0430\u044f \u043e\u043f\u0446\u0438\u044f \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b JavaScript-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432<\/a>. \u0414\u043e \u0432\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438 \u043f\u0440\u043e\u043c\u0438\u0441\u043e\u0432 (promise) JS-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0443 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u043e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u0432\u0435\u0441\u044c \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043e\u0442 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 (callback) \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0433\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f. \u0422\u0430\u043a\u043e\u0439 \u043a\u043e\u0434 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0442\u0440\u0443\u0434\u043d\u043e \u0447\u0438\u0442\u0430\u0442\u044c \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c.<\/p>\n<p>  <a href=\"https:\/\/msdn.microsoft.com\/library\/dn802826(v=vs.94).aspx\">\u041f\u0440\u043e\u043c\u0438\u0441\u044b<\/a> \u0438\u0437 ES, \u043f\u0440\u043e\u0439\u0434\u044f \u0447\u0435\u0440\u0435\u0437 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u0430\u0446\u0438\u044e \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u044f \u0432\u0441\u0435 \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u043f\u0440\u044f\u043c\u0443\u044e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430\u0445, \u043f\u043e\u043c\u043e\u0433\u043b\u0438 \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u0441\u043f\u043e\u0441\u043e\u0431 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u043d\u043e \u043d\u0435 \u0440\u0435\u0448\u0438\u043b\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u044c \u0432 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 \u043d\u0438\u043a\u0443\u0434\u0430 \u043d\u0435 \u0438\u0441\u0447\u0435\u0437\u043b\u0430.<\/p>\n<p>  \u0410\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0431\u0430\u0437\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043d\u0430 \u043f\u0440\u043e\u043c\u0438\u0441\u0430\u0445 \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0448\u0430\u0433. \u041a\u043e\u0433\u0434\u0430 \u0432\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0435 \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e <i>async<\/i> \u043a \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438\u043b\u0438 \u0441\u0442\u0440\u0435\u043b\u043e\u0447\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043e\u043d\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u043f\u0440\u043e\u043c\u0438\u0441. \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434 \u2013 \u044d\u0442\u043e \u0442\u0438\u043f\u043e\u0432\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043d\u0430 ES2015, \u0434\u0435\u043b\u0430\u044e\u0449\u0430\u044f http-\u0437\u0430\u043f\u0440\u043e\u0441 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0440\u043e\u043c\u0438\u0441\u043e\u0432:<\/p>\n<pre><code class=\"javascript\">\/\/ ES6 code, without async\/await  function httpGet(url) {     return new Promise(function (resolve, reject) {         \/\/ do the usual Http request         var request = new XMLHttpRequest();         request.open('GET', url);          request.onload = function () {             if (request.status == 200) {                 resolve(request.response);             } else {                 reject(Error(request.statusText));             }         };          request.onerror = function () {             reject(Error('Network Error'));         };          request.send();     }); }  function httpGetJson(url) {     return new Promise(function (resolve, reject) {         \/\/ check if the URL looks like a JSON file and call httpGet.         var regex = \/\\.(json)$\/i;          if (regex.test(url)) {             \/\/ call the promise, wait for the result             resolve(httpGet(url).then(function (response) {                 return response;             }, function (error) {                 reject(error);             }));         } else {             reject(Error('Bad File Format'));         }     }); }  httpGetJson('file.json').then(function (response) {     console.log(response); }).catch(function (error) {     console.log(error); });<\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u043c\u044b \u043f\u0435\u0440\u0435\u043f\u0438\u0448\u0435\u043c \u044d\u0442\u043e\u0442 \u0436\u0435 \u043a\u043e\u0434, \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0432 \u0435\u0433\u043e \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0431\u0443\u0434\u0435\u0442 \u043a\u043e\u043c\u043f\u0430\u043a\u0442\u043d\u0435\u0435 \u0438 \u043f\u0440\u043e\u0449\u0435 \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c\u0441\u044f. \u041a\u043e\u0434 \u043d\u0438\u0436\u0435 \u0442\u0430\u043a\u0436\u0435 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433 \u0432 \u0447\u0430\u0441\u0442\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043e\u0448\u0438\u0431\u043a\u0438 (\u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044e httpGetJson):<\/p>\n<pre><code class=\"javascript\">\/\/ ES7 code, with async\/await function httpGet(url) {     return new Promise(function (resolve, reject) {         \/\/ do the usual Http request         let request = new XMLHttpRequest();         request.open('GET', url);          request.onload = function () {             if (request.status == 200) {                 resolve(request.response);             } else {                 reject(Error(request.statusText));             }         };          request.onerror = function () {             reject(Error('Network Error'));         };          request.send();     }); }  async function httpGetJson(url) {     \/\/ check if the URL looks like a JSON file and call httpGet.     let regex = \/\\.(json)$\/i;      if (regex.test(url)) {         \/\/ call the async function, wait for the result         return await httpGet(url);     } else {         throw Error('Bad Url Format');     } }  httpGetJson('file.json').then(function (response) {     console.log(response); }).catch(function (error) {     console.log(error); });<\/code><\/pre>\n<p>  \u041a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e <i>async<\/i> \u0442\u0430\u043a\u0436\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441\u043e <a href=\"https:\/\/msdn.microsoft.com\/library\/yh6c50h7(v=vs.94)\">\u0441\u0442\u0440\u0435\u043b\u043e\u0447\u043d\u044b\u043c\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438 ES6<\/a>, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e \u043f\u0435\u0440\u0435\u0434 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438. \u0412\u043e\u0442 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"javascript\">\/\/ call the async function, wait for the result let func = async () =&gt; await httpGet(url); return await func(); <\/code><\/pre>\n<p>  \u0418\u0442\u043e\u0433\u043e:  <\/p>\n<ul>\n<li>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e <i>async<\/i> \u043f\u0440\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u043b\u044e\u0431\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438\u043b\u0438 \u0441\u0442\u0440\u0435\u043b\u043e\u0447\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0441 \u043f\u0440\u043e\u043c\u0438\u0441\u043e\u043c. \u042d\u0442\u043e \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0442\u0430\u043a\u0436\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432 \u043a\u043b\u0430\u0441\u0441\u0430\u0445 \u0438 \u0441\u0442\u0430\u0442\u0438\u0447\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0412 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e <i>async<\/i> \u043d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043f\u043e\u0441\u043b\u0435 \u0441\u043b\u043e\u0432\u0430 <i>static<\/i> \u0438, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043f\u0435\u0440\u0435\u0434 \u0438\u043c\u0435\u043d\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/li>\n<li>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e <i>await<\/i>, \u0447\u0442\u043e\u0431\u044b \u0445\u043e\u0434 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0434\u043e\u0436\u0434\u0430\u043b\u0441\u044f \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f async-\u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f (\u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u0432\u044b\u0437\u043e\u0432\u0430 <i>async<\/i>-\u0444\u0443\u043d\u043a\u0446\u0438\u0438) \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437 \u043f\u0440\u043e\u043c\u0438\u0441\u0430.<\/li>\n<li>\u0415\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e <i>await<\/i>, \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u0441\u0430\u043c \u043f\u0440\u043e\u043c\u0438\u0441.<\/li>\n<li>\u0412\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e <i>await<\/i> \u0432\u043d\u0435 <i>async<\/i>-\u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0435\u0433\u043e \u043d\u0435\u043b\u044c\u0437\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435.<\/li>\n<\/ul>\n<h2>\u041a\u0430\u043a \u044d\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043e \u0432 Chakra?<\/h2>\n<p>  \u0412 \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0441\u0442\u0430\u0442\u0435\u0439 \u043c\u044b <a href=\"http:\/\/blogs.msdn.com\/b\/ie\/archive\/2014\/10\/09\/announcing-key-advances-to-javascript-performance-in-windows-10-technical-preview.aspx\">\u043e\u0431\u0441\u0443\u0436\u0434\u0430\u043b\u0438 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u0434\u0432\u0438\u0436\u043a\u0430 Chakra<\/a>, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0443, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u0443\u044e \u043d\u0438\u0436\u0435. \u0427\u0430\u0441\u0442\u0438, \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0432\u0448\u0438\u0435 \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043e\u0442\u043c\u0435\u0447\u0435\u043d\u044b \u0437\u0435\u043b\u0435\u043d\u044b\u043c.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/ba6\/5b0\/b23\/ba65b0b23091a6a33b49c5a1444dbe2b.png\"\/><\/p>\n<h3>\u0413\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h3>\n<p>  \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430 <i>async<\/i> \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u043f\u0440\u043e\u043c\u0438\u0441\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439, \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441\u043e \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0435\u0439, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0431\u0435\u0440\u0442\u043a\u043e\u0439 \u0432\u043e\u043a\u0440\u0443\u0433 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0414\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f, \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u0431\u0430\u0439\u0442-\u043a\u043e\u0434\u0430 Chakra \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 \u0432\u044b\u0437\u043e\u0432 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0435\u0439 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 <a href=\"http:\/\/tc39.github.io\/ecmascript-asyncawait#desugaring\">\u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/a>:<\/p>\n<pre><code class=\"javascript\">function spawn(genF, self) {     return new Promise(function (resolve, reject) {         var gen = genF.call(self);         function step(nextF) {             var next;             try {                 next = nextF();             } catch (e) {                 \/\/ finished with failure, reject the promise                 reject(e);                 return;             }             if (next.done) {                 \/\/ finished with success, resolve the promise                 resolve(next.value);                 return;             }             \/\/ not finished, chain off the yielded promise and `step` again             Promise.resolve(next.value).then(function (v) {                 step(function () { return gen.next(v); });             }, function (e) {                 step(function () { return gen.throw(e); });             });         }         step(function () { return gen.next(undefined); });     }); }<\/code><\/pre>\n<p>  \u041f\u043e\u0440\u043e\u0436\u0434\u0430\u044e\u0449\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u0430\u044f \u0432\u044b\u0448\u0435, \u0441\u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432\u0441\u0435 <i>async<\/i>-\u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432 \u0442\u0435\u043b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 \u0440\u0435\u0448\u0438\u0442\u044c, \u043d\u0443\u0436\u043d\u043e \u043b\u0438 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u0438\u043b\u0438 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0432\u043d\u0443\u0442\u0440\u0438 <i>async<\/i>-\u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0415\u0441\u043b\u0438 <i>async<\/i>-\u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u0432\u044b\u0437\u0432\u0430\u043d\u043d\u043e\u0435 \u0441 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c \u0441\u043b\u043e\u0432\u043e\u043c <i>await<\/i>, \u043f\u0440\u043e\u0432\u0430\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u044f \u043e\u0448\u0438\u0431\u043a\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 <i>async<\/i>-\u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438\u043b\u0438 \u0432 \u0446\u0435\u043b\u043e\u043c \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e\u0433\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u0442\u043e \u043f\u0440\u043e\u043c\u0438\u0441 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u0442\u043a\u0430\u0437, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432\u044b\u0448\u0435 \u043f\u043e \u0441\u0442\u0435\u043a\u0443.<\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u0434\u0432\u0438\u0436\u043e\u043a \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043f\u043e\u0440\u043e\u0436\u0434\u0430\u044e\u0449\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0438\u0437 JS-\u0441\u043a\u0440\u0438\u043f\u0442\u0430, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u0440\u043e\u043c\u0438\u0441 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u043a\u043e\u0433\u0434\u0430 \u043f\u0430\u0440\u0441\u0435\u0440 \u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e async, \u0434\u0432\u0438\u0436\u043e\u043a \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442 AST (\u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u043e\u0435 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e), \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0435\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c, \u0447\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432\u044b\u0437\u043e\u0432 spawn-\u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441 \u0442\u0435\u043b\u043e\u043c \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u041a\u0430\u043a \u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0435, \u0444\u0443\u043d\u043a\u0446\u0438\u044f httpGetJson \u0438\u0437 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0432\u044b\u0448\u0435 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u0430\u0440\u0441\u0435\u0440\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"javascript\">function httpGetJson(url) {     return spawn(function* () {         \/\/ check if the URL looks like a JSON file and call httpGet.         var regex = \/\\.(json)$\/i;          if (regex.test(url)) {             \/\/ call the async function, wait for the result             return yield httpGet(url);         } else {             throw Error('Bad Url Format');         }     }, this); }<\/code><\/pre>\n<p>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 <a href=\"https:\/\/msdn.microsoft.com\/en-us\/library\/Dn858237(v=VS.94).aspx\">\u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432<\/a> \u0438 \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430 <i>yield<\/i> \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430 <i>await<\/i>. \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430 <i>await<\/i> \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0445\u043e\u0436\u0430 \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c \u0441\u043b\u043e\u0432\u043e\u043c <i>yield<\/i>.<\/p>\n<h3>\u041f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0441 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e<\/h3>\n<p>  \u041e\u0434\u043d\u0430 \u0438\u0437 \u043d\u043e\u0432\u044b\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 ES6 \u2013 \u044d\u0442\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0434\u043b\u044f \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u041a\u043e\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u0431\u0430\u0439\u0442-\u043a\u043e\u0434\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0442\u0435\u043b\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n<pre><code class=\"javascript\">\/\/ original JavaScript code function foo(argument = true) {     \/\/ some stuff }  \/\/ representation of the Bytecode Generator's output in JavaScript function foo(argument) {     argument = true;     \/\/ some stuff }<\/code><\/pre>\n<p>  \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430 <i>async<\/i>, \u0435\u0441\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u044e \u043e\u0448\u0438\u0431\u043a\u0438 (\u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f), \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043e\u0442\u043a\u0430\u0437\u0430\u0442\u044c \u0432 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u043f\u0440\u043e\u043c\u0438\u0441\u0430. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441 \u043b\u0435\u0433\u043a\u043e\u0441\u0442\u044c\u044e \u043e\u0442\u043b\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e \u0432 Chakra, \u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0431\u044b\u043b \u0432\u044b\u0431\u043e\u0440 \u0438\u0437 \u0434\u0432\u0443\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432: \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c AST, \u0438\u043b\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0432 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0435 \u0431\u0430\u0439\u0442-\u043a\u043e\u0434\u0430. \u041c\u044b \u0432\u044b\u0431\u0440\u0430\u043b\u0438 \u0432\u0442\u043e\u0440\u043e\u0435 \u0438 \u043f\u0435\u0440\u0435\u0434\u0432\u0438\u043d\u0443\u043b\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u043d\u0430\u0447\u0430\u043b\u043e \u0442\u0435\u043b\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0432 \u0431\u0430\u0439\u0442-\u043a\u043e\u0434\u0435, \u0442\u0430\u043a \u043a\u0430\u043a \u044d\u0442\u043e \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u0438 \u043f\u043e\u043d\u044f\u0442\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043d\u0430\u0448\u0435\u0433\u043e \u0434\u0432\u0438\u0436\u043a\u0430. \u0422\u0430\u043a \u043a\u0430\u043a \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u0430 \u043e\u0448\u0438\u0431\u043e\u043a \u0438\u0437 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0431\u043b\u043e\u043a <i>try\/catch<\/i>, \u0442\u043e \u043d\u0430\u043c \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0449\u0435 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0431\u0430\u0439\u0442-\u043a\u043e\u0434 \u043f\u0440\u0438 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0438 \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430 async.<\/p>\n<p>  \u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0431\u0430\u0439\u0442-\u043a\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0439 \u0434\u043b\u044f \u0442\u0430\u043a\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043d\u0430 JavaScript:<\/p>\n<pre><code class=\"javascript\">\/\/ representation of the Bytecode Generator's output in JavaScript function foo(argument) {     try {         argument = true;     } catch (error) {         return Promise.reject(error);     }     return spawn(function* () { \/\/ keep this call as we are in an async function         \/\/ some stuff     }, this); } <\/code><\/pre>\n<h2>\u041a\u0430\u043a \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 Microsoft Edge?<\/h2>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0432 Microsoft Edge, \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 <i>about:flags<\/i> \u0432 Microsoft Edge \u0438 \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043e\u043f\u0446\u0438\u044e \u201cEnable experimental JavaScript features\u201d, \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0438\u0436\u0435:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/3fd\/dd4\/307\/3fddd4307f97f431e3f0755492c2763a.png\"\/><\/p>\n<p>  \u0410\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0432 \u043f\u0440\u0435\u0432\u044c\u044e-\u0440\u0435\u0436\u0438\u043c\u0435 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 <a href=\"https:\/\/insider.windows.com\/\">\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b Windows Insider<\/a>, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441\u043e \u0441\u0431\u043e\u0440\u043a\u0438 <a href=\"https:\/\/dev.modern.ie\/platform\/changelog\/desktop\/10547\/\">Microsoft Edge 13.10547<\/a>. \u0411\u0443\u0434\u0435\u043c \u0440\u0430\u0434\u044b \u0443\u0441\u043b\u044b\u0448\u0430\u0442\u044c \u0432\u0430\u0448\u0438 \u043e\u0442\u0437\u044b\u0432\u044b \u043f\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e \u0434\u0430\u043d\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0432 \u0432\u0430\u0448\u0435\u043c \u043a\u043e\u0434\u0435 \u0432 \u043d\u0430\u0448\u0435\u043c Twitter <a href=\"http:\/\/twitter.com\/msedgedev\">@MSEdgeDev<\/a> \u0438\u043b\u0438 \u0447\u0435\u0440\u0435\u0437 <a href=\"http:\/\/connect.microsoft.com\/ie\">Connect<\/a>.<\/p>\n<p>  \u2013 <a href=\"https:\/\/twitter.com\/VelerSoftware\">Etienne Baudoux<\/a>, Software Development Engineer Intern, Chakra Team<br \/>  \u2013 <a href=\"https:\/\/twitter.com\/bterlson\">Brian Terlson<\/a>, Senior Program Manager, Chakra Team       <\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/269871\/\"> http:\/\/habrahabr.ru\/post\/269871\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       \u0425\u043e\u0442\u044f \u043c\u044b \u0435\u0449\u0435 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c <a href=\"http:\/\/blogs.windows.com\/msedgedev\/2015\/05\/12\/javascript-moves-forward-in-microsoft-edge-with-ecmascript-6-and-beyond\/\">\u0440\u0430\u0431\u043e\u0442\u0443 \u043d\u0430\u0434 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0435\u043c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 ES6\/2015<\/a>, \u043a\u043e\u043c\u0430\u043d\u0434\u0430 Chackra \u0442\u0430\u043a\u0436\u0435 \u0441\u043c\u043e\u0442\u0440\u0438 \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u044b ES2016 \u0438, \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u043d\u0430 <a href=\"https:\/\/dev.modern.ie\/platform\/status\/asyncfunctionses2016\/\">\u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/a>. \u041c\u044b \u0440\u0430\u0434\u044b \u043e\u0431\u044a\u044f\u0432\u0438\u0442\u044c \u043e\u0431 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0435 async-\u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0432 Microsoft Edge, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441\u043e \u0441\u0431\u043e\u0440\u043a\u0438 <a href=\"https:\/\/dev.modern.ie\/platform\/changelog\/desktop\/10547\/\">Microsoft Edge (EdgeHTML 13.10547)<\/a>.<\/p>\n<p>  <iframe loading=\"lazy\" src=\"https:\/\/channel9.msdn.com\/Blogs\/Seth-Juarez\/Async-Functions-in-JavaScript-with-Etienne-Baudoux\/player\" width=\"640\" height=\"360\"><\/iframe>  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-267190","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/267190","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=267190"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/267190\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=267190"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=267190"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=267190"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}