<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>serip39</author_name>
  <author_url>https://blog.hatena.ne.jp/serip39/</author_url>
  <blog_title>7839</blog_title>
  <blog_url>https://serip39.hatenablog.com/</blog_url>
  <categories>
    <anon>技術</anon>
    <anon>JavaScript</anon>
    <anon>React</anon>
  </categories>
  <description>今回、HP 内で意図的にブラウザバックを制御して、UX を向上させられるようにしたので、実装方法を紹介する。 ブラウザバックの制御に関して 実装例 まとめ ブラウザバックの制御に関して ブラウザバックを制御するためには、セッション履歴を操作する必要がある。制御の流れは以下である。 ページがレンダリングされたら、ダミーのセッション履歴を追加しておく ユーザーがブラウザの「戻る」ボタンを押す（1. でダミーの履歴を挿入していたので、実際にはブラウザバックが動作しない） popstateイベントが発火する 条件に応じて、以下を実行する a. ブラウザバックをする b. 任意の操作をする（再度、ブラウ…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fserip39.hatenablog.com%2Fentry%2F2020%2F12%2F20%2F210000&quot; title=&quot;【JS / React】ブラウザバックを制御する - 7839&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/s/serip39/20200524/20200524234831.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2020-12-20 21:00:00</published>
  <title>【JS / React】ブラウザバックを制御する</title>
  <type>rich</type>
  <url>https://serip39.hatenablog.com/entry/2020/12/20/210000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
