From 66dd961c765e2843fdc3ed463baa19873924c0a3 Mon Sep 17 00:00:00 2001 From: Masahiro FUJIMOTO Date: Wed, 18 Aug 2021 14:33:08 +0900 Subject: 意味のない title 属性を削除 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix #1877 --- files/ja/web/api/history_api/working_with_the_history_api/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'files/ja/web/api/history_api') diff --git a/files/ja/web/api/history_api/working_with_the_history_api/index.html b/files/ja/web/api/history_api/working_with_the_history_api/index.html index c7b71399b2..a2fb053d73 100644 --- a/files/ja/web/api/history_api/working_with_the_history_api/index.html +++ b/files/ja/web/api/history_api/working_with_the_history_api/index.html @@ -54,7 +54,7 @@ history.pushState(stateObj, "page 2", "bar.html"); -
注: Gecko 2.0 {{ geckoRelease("2.0") }} より Gecko 5.0 {{ geckoRelease("5.0") }} に於いては、渡されたオブジェクトは JSON を使用してシリアライズされます。Gecko 6.0 {{ geckoRelease("6.0") }} より、オブジェクトは the structured clone algorithm を使用してシリアライズされます。これにより多種多様なオブジェクトを安全に渡せるようになります。
+
注: Gecko 2.0 {{ geckoRelease("2.0") }} より Gecko 5.0 {{ geckoRelease("5.0") }} に於いては、渡されたオブジェクトは JSON を使用してシリアライズされます。Gecko 6.0 {{ geckoRelease("6.0") }} より、オブジェクトは the structured clone algorithm を使用してシリアライズされます。これにより多種多様なオブジェクトを安全に渡せるようになります。

ある意味では、pushState() の呼び出しは window.location = "#foo"; と設定するのと似ています。どちらも、現在のドキュメントに関連する別の履歴エントリの生成とアクティベートを行います。ですが pushState() にはいくらかの利点があります:

@@ -77,7 +77,7 @@ history.pushState(stateObj, "page 2", "bar.html");

具体的には、何らかのユーザーのアクションを受け、現在の履歴エントリの URL または state オブジェクトを更新したい場合に replaceState() が役立ちます。

-
注: Gecko 2.0 {{ geckoRelease("2.0") }} より Gecko 5.0 {{ geckoRelease("5.0") }} に於いては、渡されたオブジェクトは JSON を使用してシリアライズされます。Gecko 6.0 {{ geckoRelease("6.0") }} より、オブジェクトは the structured clone algorithm を使用してシリアライズされます。これにより多種多様なオブジェクトを安全に渡せるようになります。
+
注: Gecko 2.0 {{ geckoRelease("2.0") }} より Gecko 5.0 {{ geckoRelease("5.0") }} に於いては、渡されたオブジェクトは JSON を使用してシリアライズされます。Gecko 6.0 {{ geckoRelease("6.0") }} より、オブジェクトは the structured clone algorithm を使用してシリアライズされます。これにより多種多様なオブジェクトを安全に渡せるようになります。

replaceState() の例

-- cgit v1.2.3-54-g00ecf