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). |
|
|
|
![]() |
Post
#2
|
|
|
Grupa: Zarejestrowani Postów: 205 Pomógł: 43 Dołączył: 5.03.2012 Ostrzeżenie: (0%)
|
window.dispatchEvent(new HashChangeEvent("hashchange"))
https://developer.mozilla.org/en-US/docs/DO...hashchange#dasf http://www.whatwg.org/specs/web-apps/curre...vent-hashchange |
|
|
|
grasnal How to manually dispatch hashchange event (w środku PL) 23.02.2013, 21:34:27
grasnal Podziękował. EOT. 24.02.2013, 12:51:21 ![]() ![]() |
|
Aktualny czas: 28.12.2025 - 16:37 |