diff options
| author | Stephen Blott | 2016-03-05 06:36:16 +0000 |
|---|---|---|
| committer | Stephen Blott | 2016-03-06 11:27:45 +0000 |
| commit | 0822f8244d328233752c7f986a70e805ee238979 (patch) | |
| tree | d0e313d7ccf3d77e50923a195709840610d8f585 /git_hooks | |
| parent | 755c9fb4f837a9f8b80d51610e86c3ba2ea1999f (diff) | |
| download | vimium-0822f8244d328233752c7f986a70e805ee238979.tar.bz2 | |
Initialize UI components only when they're needed.
HUD: Initialize only when the frame receives the focus and Vimium is enabled.
Vomnibar: Initialize in the top frame when Vimium is enabled in *any* frame.
Warning: There may be a race condition here. Specifically, if Vimium
is disabled in the main/top frame (T) but enabled in another frame (A), then the
initialisation could happen in frame A before frame T is listening, so
frame T would miss the initialization message (which is only sent once).
Message listeners are installed early (and probably installed first in
the main/top frame), and the `isEnabledForUrl` messaging takes some
time, so perhaps it's OK. But it *is* a race condition.
Fixes #1838.
Diffstat (limited to 'git_hooks')
0 files changed, 0 insertions, 0 deletions
