mirror of
https://github.com/ansible/awx.git
synced 2026-01-21 06:28:01 -03:30
18 lines
520 B
JavaScript
18 lines
520 B
JavaScript
exports.command = function waitForAngular (callback) {
|
|
this.timeoutsAsyncScript(this.globals.asyncHookTimeout, () => {
|
|
this.executeAsync(done => {
|
|
if (angular && angular.getTestability) {
|
|
angular.getTestability(document.body).whenStable(done);
|
|
} else {
|
|
done();
|
|
}
|
|
}, [], result => {
|
|
if (typeof callback === 'function') {
|
|
callback.call(this, result);
|
|
}
|
|
});
|
|
});
|
|
|
|
return this;
|
|
};
|