MCPcopy Index your code
hub / github.com/prototypejs/prototype / wait

Function wait

test/unit/static/js/test_helpers.js:56–68  ·  view source on GitHub ↗
(duration, done, fn)

Source from the content-addressed store, hash-verified

54 // A function that acts like setTimeout, except with arguments reversed. This
55 // is far more readable within tests.
56 function wait(duration, done, fn) {
57 var handler = function () {
58 try {
59 fn();
60 } catch (e) {
61 // Instead of relying on window.onerror to detect an error was
62 // thrown (which is problematic in IE6-7), we invoke the callback
63 // with an error the way Mocha expects.
64 return done(e);
65 }
66 };
67 return setTimeout(handler, duration);
68 }
69 window.wait = wait;
70
71 function buildMessage() {

Callers 5

function.test.jsFile · 0.85
layout.test.jsFile · 0.85
dom.test.jsFile · 0.85
form.test.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected