diff options
| author | Stephen Blott | 2016-04-02 12:12:19 +0100 | 
|---|---|---|
| committer | Stephen Blott | 2016-04-02 12:27:21 +0100 | 
| commit | 57c3cae5abd5c796b093ad02661b040b2c877fc4 (patch) | |
| tree | 9c80ebc1a1b080d5ed055b36f9b1b25450e60c84 /tests/dom_tests/dom_tests.html | |
| parent | 89df06fa6c00c9295ff064308c03f770b01d79be (diff) | |
| download | vimium-57c3cae5abd5c796b093ad02661b040b2c877fc4.tar.bz2 | |
Refactor DomUtils.documentReady.
We do not need to install separate event listeners for every callback.
Just install one listener and keep track of the callbacks ourself.
This is clearer, and also determines the order in which callbacks are
called.  (Although, we don't rely on that currently.)
This also adds a tests.
Diffstat (limited to 'tests/dom_tests/dom_tests.html')
| -rw-r--r-- | tests/dom_tests/dom_tests.html | 2 | 
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/dom_tests/dom_tests.html b/tests/dom_tests/dom_tests.html index ab48a88a..d2e795d1 100644 --- a/tests/dom_tests/dom_tests.html +++ b/tests/dom_tests/dom_tests.html @@ -32,6 +32,8 @@      <script type="text/javascript" src="../../lib/utils.js"></script>      <script type="text/javascript" src="../../lib/keyboard_utils.js"></script>      <script type="text/javascript" src="../../lib/dom_utils.js"></script> +    <!-- For DomUtils.documentReady() tests; see ./dom_utils_test.coffee. --> +    <script>DomUtils.documentReady(function() {window.documentReadyListenerCalled = true;})</script>      <script type="text/javascript" src="../../lib/rect.js"></script>      <script type="text/javascript" src="../../lib/handler_stack.js"></script>      <script type="text/javascript" src="../../lib/clipboard.js"></script>  | 
