Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> How to manually dispatch hashchange event (w środku PL)
grasnal
post
Post #1





Grupa: Zarejestrowani
Postów: 8
Pomógł: 0
Dołączył: 2.07.2009

Ostrzeżenie: (0%)
-----


Hej!

Przeklejam ze StackOverflow bo nie doczekałem się tam odpowiedzi. Może tu jakaś dobra dusza mnie pokieruje. Z góry dzięki.

---------


1 - What is correct syntax for WebKit (primary for Safari on iPad, good if it works on Win Chrome) to .addEventListener to hashChange event?

2 - Is is possible (and how) to manually/programmatically dispatch hashChange event by .dispatchEvent on browsers mentioned above?

TIA.

I've found answer for 1:

window.addEventListener("hashchange", function() {console.log(location.hash)});

But I still have no idea how to dispatch hashchange manual since I don't know what EVENTOBJECT I should pass to window.dispatchEvent(EVENTOBJECT).
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 23.08.2025 - 12:55