The popular open-source contract for web designers and developers by Stuff & Nonsense
- Originally published: 23/12/2008
- Revised date: 15/12/2013
- Original post
| var system = require('system'), | |
| env = system.env; | |
| /** | |
| * Wait until the test condition is true or a timeout occurs. Useful for waiting | |
| * on a server response or for a ui change (fadeIn, etc.) to occur. | |
| * | |
| * @param testFx javascript condition that evaluates to a boolean, | |
| * it can be passed in as a string (e.g.: "1 == 1" or "$('#bar').is(':visible')" or | |
| * as a callback function. |