タグ

関連タグで絞り込む (1)

タグの絞り込みを解除

JavaScriptとes6に関するyo_wakaのブックマーク (3)

  • Promiseについて - JS.next

    概要 Promiseとは非同期処理を上手く扱う為のAPIであり、パターンである。 非同期の処理の完了後に続けて処理を行いたいとき、よくコールバックパターンが使われるが、処理が連続するとコールバック地獄と言われる分かりづらいソースコードになってしまう。 また、複数の非同期処理が完了した時に処理を行うなど、コールバックパターンでは難しい事をスマートにできるのがこのPromiseである。 今まではDOMの方でDOM Promiseとして仕様策定が進められていたり、ライブラリのDeferredが有名だったが、ES2015標準に入ることになり、V8に実装された。 実装されたメソッド Promise.resolve(x) Promise.reject(x) Promise.all( [p1, p2, p3, ......] ) Promise.race( [p1, p2, p3, ......] )

    Promiseについて - JS.next
  • ECMAScript 6 modules in future browsers

    Update 2013-11-22: David Herman has published the slide deck “Status Report: ES6 Modules”. [1] is an introduction to ECMAScript 6 modules and how they can be used in current browsers. In contrast, this blog post explains how future browsers will support them natively. As part of that support, we will get the <module> tag, a better version of the <script> tag. Browsers: asynchronous modules, synchr

  • authoring yui modules using ES6

    What is this? This is a gist to showcase how can we get yui modules authored using ES6 module syntax and then getting them transpile into various formats, including AMD, CommonJS and YUI.add. Why ES6 for authoring yui modules Inter-operability Contextualization by removing the needs of a common namespace and focus on exports instead. Better control of the isolated units that can be required/used p

    authoring yui modules using ES6
  • 1