<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>anatofuz</author_name>
  <author_url>https://blog.hatena.ne.jp/anatofuz/</author_url>
  <blog_title>Acme::AnaTofuZ-&gt;new;</blog_title>
  <blog_url>https://anatofuz.hatenablog.com/</blog_url>
  <categories>
    <anon>javascript</anon>
  </categories>
  <description>雰囲気で理解したのでメモです。 JSの世界だとPromiseがあって、基本的に失敗/成功で処理を切り分けていく事ができる。 よく使われる方法だと、非同期処理を同期的に使いたいときに使われる。 例えばAというエンドポイントにアクセスした後に取得した情報で、Bエンドポイントにアクセスする必要がある場合、何も考えずにjsで書いてしまうとAの処理が終わる前にBにアクセスに行く可能性がある。 Promiseを使うとAが終わるまでBが処理されないので同期的に使うことが可能。 ちなみにJQueryの世界にはJQuery Promiseというものがある。JSのnativeなPromiseとの使い分けはこのSt…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fanatofuz.hatenablog.com%2Fentry%2F2021%2F06%2F03%2F190221&quot; title=&quot;JSのPromiseとJQueryPromiseを雰囲気で理解した - Acme::AnaTofuZ-&amp;gt;new;&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2021-06-03 19:02:21</published>
  <title>JSのPromiseとJQueryPromiseを雰囲気で理解した</title>
  <type>rich</type>
  <url>https://anatofuz.hatenablog.com/entry/2021/06/03/190221</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
