<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>todays_mitsui</author_name>
  <author_url>https://blog.hatena.ne.jp/todays_mitsui/</author_url>
  <blog_title>無駄と文化</blog_title>
  <blog_url>https://blog.mudatobunka.org/</blog_url>
  <categories>
    <anon>JavaScript</anon>
  </categories>
  <description>ブラウザにフォントが読み込まれたタイミングで JavaScript の処理を実行したいと思ったとき、以前であればサードパーティー製のライブラリを使っていた *1 けど、最近はブラウザの標準 API だけで読み込みタイミングの判定ができるようだ。 Document.fonts を使う。 使用例 document.fonts.ready を参照すると Promise が取れる。 document.fonts.ready.then(function(fontFaceSet) { // フォント読み込み完了後に実行される console.info({ fontFaceSet }); }); ブラウザ対…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.mudatobunka.org%2Fentry%2F2022%2F02%2F04%2F202350&quot; title=&quot;フォント読み込み完了のタイミングで処理を実行する - 無駄と文化&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>https://cdn-ak.f.st-hatena.com/images/fotolife/t/todays_mitsui/20220204/20220204201402.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2022-02-04 20:23:50</published>
  <title>フォント読み込み完了のタイミングで処理を実行する</title>
  <type>rich</type>
  <url>https://blog.mudatobunka.org/entry/2022/02/04/202350</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
