<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>mamorums</author_name>
  <author_url>https://blog.hatena.ne.jp/mamorums/</author_url>
  <blog_title>C#, Python, Web開発</blog_title>
  <blog_url>https://web-dev.hatenablog.com/</blog_url>
  <categories>
    <anon>JS/CSS/HTML</anon>
  </categories>
  <description>JavaScript を使って、ドキュメントやリソース（CSSや画像など）の読み込みが完了した時に処理を実行する方法を書いていきます。 目次 実行方法 実行順序 使い分け jQueryについて 1. 実行方法 ドキュメントの DOMContentLoaded を使うと、HTMLの読み込み（DOMの解析）が完了した時に処理を実行することができます。 document.addEventListener('DOMContentLoaded', (event) =&gt; { // 処理を記述 }); また、ウィンドウの load を使うと、全てのリソース（スタイルシートや画像など）が読み込まれた後に処理を…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fweb-dev.hatenablog.com%2Fentry%2Fweb%2Fjs%2Fevent%2Fload&quot; title=&quot;JavaScript ドキュメントの読込完了時に処理を実行する方法 - C#, Python, Web開発&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>2024-01-18 14:25:00</published>
  <title>JavaScript ドキュメントの読込完了時に処理を実行する方法</title>
  <type>rich</type>
  <url>https://web-dev.hatenablog.com/entry/web/js/event/load</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
