Skip to content

Commit c7d03a5

Browse files
committed
Use attachEvent(onpopstate) in old IE
1 parent a177930 commit c7d03a5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/locations/HistoryLocation.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ var HistoryLocation = {
4141
if (window.addEventListener) {
4242
window.addEventListener('popstate', onPopState, false);
4343
} else {
44-
window.attachEvent('popstate', onPopState);
44+
window.attachEvent('onpopstate', onPopState);
4545
}
4646

4747
_isListening = true;
@@ -57,7 +57,7 @@ var HistoryLocation = {
5757
if (window.addEventListener) {
5858
window.removeEventListener('popstate', onPopState);
5959
} else {
60-
window.removeEvent('popstate', onPopState);
60+
window.removeEvent('onpopstate', onPopState);
6161
}
6262

6363
_isListening = false;

0 commit comments

Comments
 (0)