Реклама
I've Many Causes To Hope
10-04-2023, 14:28 | Автор: KristyOToole | Категория: PSD
One of the things I've poured myself into this yr -- with a merry band of contributors together with Domenic Denicola, Anne van Kesteren, Jake Archibald, Mark Miller, Erik Arvidsson, and many others -- has been a design for Promises that DOM and JS can each undertake. There's a (very) lengthy historical past of Promises, Deferreds, and numerous other Promise-ish issues in JS which I will not bore you with here except to note that there are only a few client-facet libraries which don't include such a thing and use it as a core idiom for coping with async behvaior (e.g., XHR).

Question, Dojo, Q, WinJS, Cujo, Closure, YUI, Ember (via RSVP), and all the rest use this fashion of contract pervasively and have for years. The major libraries are coalescing around that contract and so it seems time, finally, to make our greatest and most necessary library -- DOM -- savvy to them too.

The recent historical past starts (arbitrarily) a few years in the past and ends 2 weeks in the past. API we've designed need not upset anyone's applecart.

The TC39 meeting was a key turning point: up till 2 weeks in the past, DOM had a model of this design underneath the title Future. I made the choice to not use the name Promise for that work as a result of with out TC39's agreement on a design, the DOM variant might in some unspecified time in the future find itself each camping on a world title and disagreeing with JS about semantics or naming of specific APIs.

That kind of factor may need lead to the suspicion by DOM folks that TC39 was out of touch and sluggish, and by TC39 that DOM rushed in like fools into a space that's pretty clearly something the std lib ought to embrace (even if it couldn't achieve this for a number of years due to publication and spec timing issues).

Guarantees, notably Internet Crypto and Web MIDI. There has also been lively discussion about other APIs that can benefit from moving to a regular mechanism for describing async operations.

It appears, in each individual case, crypto market expectations like this should not be such an enormous deal. The big motive to spend months of my life on this drawback, and to harass different very busy individuals to do the same, is to me the core value of net standards: after they're working nicely, they create a uniform floor area that describes a coherent platform. We're the beneficiaries of this uniformity right now regarding occasions, and they're a significant piece of the design language which DOM API authors can reliably use to assist describe bits of their design.

Promises, like Events, Crypto-markets are yet one more device within the field that DOM APIs authors can use, and due to sane constructors and the flexibility to subclass built into the design, it is doable for finish-consumer code to finally put down the customized implementations of Promise-like issues and simply rely on the platform to do what platforms should do: make cheap and simple what beforehand was frequent but costly.
Скачать Skymonk по прямой ссылке
Просмотров: 19  |  Комментариев: (0)
Уважаемый посетитель, Вы зашли на сайт kopirki.net как незарегистрированный пользователь.
Мы рекомендуем Вам зарегистрироваться либо войти на сайт под своим именем.