dojo
Version:
Dojo core is a powerful, lightweight library that makes common tasks quicker and easier. Animate elements, manipulate the DOM, and query with easy CSS syntax, all without sacrificing performance.
16 lines (14 loc) • 333 B
JavaScript
define([
'intern/dojo/node!leadfoot/helpers/pollUntil'
], function (pollUntil) {
function ready(remote, url, timeout) {
return remote
.get(url)
.then(pollUntil(
'return typeof ready !== "undefined" && ready ? true : undefined;',
[],
typeof timeout === 'undefined' ? 5000 : timeout
));
}
return ready;
});