HashChangeEvent

HashChangeEvent

仕様書

hashchange イベント

[5] hashchange イベントは、表示中の文書の番地素片識別子が変更された時、 発火されます。

[6] 履歴の探索が発生した時に、必要なら Window オブジェクト発火されます。

[7] navigate により新しい文書を表示した時には発火しません。
[8] 発火は、文書の番地の変更後に行われます。

HashChangeEvent インターフェイス

[42] HashChangeEvent インターフェイス >>41 は、 hashchange イベントと共に用いられます。 文書環境ワーカー環境晒されています >>41

[44] HashChangeEvent インターフェイスは、 他の Event インターフェイス同様のコンストラクターを持ちます >>41。 初期化のための辞書は HashChangeEventInit です >>41

[43] HashChangeEvent インターフェイスは、 Event インターフェイス継承しています >>41HashChangeEventInit 辞書は、 EventInit 辞書継承しています >>41

[45] HashChangeEvent インターフェイスおよび HashChangeEventInit 辞書は、USVString 型の読み取り専用IDL属性 oldURL, newURL (共に既定値空文字列) を持ちます >>41履歴の探索hashchange イベント発火される時は、元の URL と新しい URL が設定されます。どちらも素片識別子以外は同じはずです。

歴史

[3] Re: several messages about an event for when the #fragid changes (Ian Hickson <ian@...> 著, 版) <http://permalink.gmane.org/gmane.org.w3c.whatwg.discuss/11644>

[1] クロスブラウザな onhashchange イベント (作りかけ) - Yet Another Hackadelic ( 版) <http://d.hatena.ne.jp/ZIGOROu/20081205/1228465473>

[2] Firefox 3.6 for developers - MDC ( 版) <https://developer.mozilla.org/en/Firefox_3.6_for_developers#DOM>

[9] Editorial: define Event attribute defaults through IDL · whatwg/html@0be0229 ( 版) <https://github.com/whatwg/html/commit/0be02299f128cbb7c65a7ce259fdd838fd44a4b5>

[10] Use USVString for oldURL, newURL, and origin attributes on events · whatwg/html@5d5702d ( 版) <https://github.com/whatwg/html/commit/5d5702d35a0b7457481d1013154f14aab25500bf>

[11] Make HashChangeEvent members default to the empty string ( (annevk著, )) <https://github.com/whatwg/html/commit/cf02812b16c7eee9ac9943b4abec14c0f26b248f>

[4] [] (0) Let's try adding an event that fires when you change just the … ( (Hixie著, )) <https://github.com/whatwg/html/commit/6efa630d6498f2f525e9a182a6f5381dbed62a70>

[12] [e] (0) Clear up the navigate-fragid section (nothing important chang… ( (Hixie著, )) <https://github.com/whatwg/html/commit/56e00f08166d9af357727d6fb3c2184c4f569daa>

[13] [i] (2) Mute hashchanged until after the load event has fired, to avo… ( (Hixie著, )) <https://github.com/whatwg/html/commit/589d7d3bd880f1f487418c6ed7583fed03d6344b>

[14] PopStateEvent/HashChangeEvent/PageTransitionEvent are Window-only (zcorpan著, ) <https://github.com/whatwg/html/commit/dec1a5809e15d29592a66147ce2bed5018121b5f>

[15] Make popstate and hashchange events not bubble (foolip著, ) <https://github.com/whatwg/html/commit/85e1e724cf09574dba47d5eae689bdb5b7fd6502>

[16] Let the popstate and hashchange events not bubble by foolip · Pull Request #3737 · whatwg/html () <https://github.com/whatwg/html/pull/3737>