Skip to content

Commit 70f0488

Browse files
committedJun 22, 2018
Don't override window.onload/onhashchange
Fixes #3
1 parent 537b891 commit 70f0488

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src/dereference.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import { selectorToRange } from 'dom-anchor-selector'
22
import { uriToSpecificResource } from 'selector-state-frags'
33
import scrollIntoView from 'scroll-into-view'
44

5-
window.onload = processWindowLocation
6-
window.onhashchange = processWindowLocation
5+
window.addEventListener('load', processWindowLocation)
6+
window.addEventListener('hashchange', processWindowLocation)
77

88
function processWindowLocation() {
99
const uri = window.location.href

0 commit comments

Comments
 (0)
Please sign in to comment.