aboutsummaryrefslogtreecommitdiffstats
path: root/content_scripts/vimium_frontend.coffee
diff options
context:
space:
mode:
authorStephen Blott2016-04-02 11:54:04 +0100
committerStephen Blott2016-04-02 11:54:04 +0100
commit89df06fa6c00c9295ff064308c03f770b01d79be (patch)
tree78b37eeebe5fbdde82c15246f9034473db301bf8 /content_scripts/vimium_frontend.coffee
parent175f4b275c49ba332000ab773061777af820a87f (diff)
downloadvimium-89df06fa6c00c9295ff064308c03f770b01d79be.tar.bz2
Rework DomUtils.documentReady().
There seems to be an issue on this page: - http://i.imgur.com/PdmUjij.jpg whereby "DOMContentLoaded" isn't firing. The page structure is unusual (involving a shadow-DOM element), which might be the source of the problem. What happens is that the "DOMContentLoaded" event fires as required, but the document state is still "loading". Here, we just say that if the "DOMContentLoaded" handler has fired once, then we're good to go.
Diffstat (limited to 'content_scripts/vimium_frontend.coffee')
-rw-r--r--content_scripts/vimium_frontend.coffee6
1 files changed, 3 insertions, 3 deletions
diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee
index f14c5d07..39bfaacb 100644
--- a/content_scripts/vimium_frontend.coffee
+++ b/content_scripts/vimium_frontend.coffee
@@ -436,10 +436,10 @@ extend window,
# Initialize UI components which are only installed in the main/top frame.
initializeTopFrameUIComponents = do ->
- Frame.addEventListener "initializeTopFrameUIComponents", Utils.makeIdempotent Vomnibar.init.bind Vomnibar
+ Frame.addEventListener "initializeTopFrameUIComponents", Utils.makeIdempotent ->
+ DomUtils.documentReady Vomnibar.init.bind Vomnibar
- Utils.makeIdempotent ->
- DomUtils.documentReady -> Frame.postMessage "initializeTopFrameUIComponents"
+ Utils.makeIdempotent -> Frame.postMessage "initializeTopFrameUIComponents"
# Initialize UI components which are only installed in all frames (i.e., the HUD).
initializeAllFrameUIComponents = Utils.makeIdempotent ->