Last active
November 10, 2015 23:25
-
-
Save hzhu/7777970a8e54f650df66 to your computer and use it in GitHub Desktop.
Reagent Register document.readyState
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn register-dom-complete [] | |
(aset js/document "onreadystatechange" | |
(fn [x] | |
(let [ready-state (.-readyState js/document)] | |
(if (= ready-state "complete") | |
(js/alert "DOM has completely loaded: invoke your callbacks here.") | |
))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment