Skip to content

Instantly share code, notes, and snippets.

@jasononeil
Last active December 15, 2015 03:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasononeil/5193958 to your computer and use it in GitHub Desktop.
Save jasononeil/5193958 to your computer and use it in GitHub Desktop.
A lot of the time in JS we have to wait for the page to finish loading, or at least, for the DOM to be loaded, before we can begin our various operations. Detox makes this easy with the Detox.ready() function, which fires the given function as soon as the DOM is loaded.
using Detox;
public class DOMReady
{
static function main()
{
Detox.ready(function (e) {
Detox.document.title = "Page is ready";
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment