selenium-webdriver
Version:
The official WebDriver JavaScript bindings from the Selenium project
11 lines (10 loc) • 4.6 kB
HTML
<meta charset="UTF-8"><meta http-equiv="Content-Language" content="en" /><title>goog.async.nextTick</title><link href="dossier.css" rel="stylesheet" type="text/css"><div id="main-wrapper"><input type="checkbox" id="sidenav-toggle" /><main><header><h1>Namespace goog.async.nextTick.<code class="type"><SCOPE></code></h1><a class="source" href="source/lib/goog/async/nexttick.js.src.html#l58">code »</a></header><section><p>Fires the provided callbacks as soon as possible after the current JS
execution context. setTimeout(…, 0) takes at least 4ms when called from
within another setTimeout(…, 0) for legacy reasons.
This will not schedule the callback as a microtask (i.e. a task that can
preempt user input or networking callbacks). It is meant to emulate what
setTimeout(_, 0) would do if it were not throttled. If you desire microtask
behavior, use goog.Promise instead.<h2>Main</h2><div class="ctor wrap-details public"><div><div class="ctor"><code class="type"><SCOPE></code> <span class="member">nextTick <span class="args">( callback, opt_context )</span></span></div><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>callback: <code class="type">function(this: SCOPE)</code><dd>Callback function to fire as soon as
possible.<dt>opt_context: <code class="type">SCOPE=</code><dd>Object in whose scope to call the listener.</dl></table></div></div></div></section><div id="visibility-controls"><b>Show:</b><label for="show-public"><span><input type="checkbox" id="show-public" checked/></span>Public</label><label for="show-protected"><span><input type="checkbox" id="show-protected"/></span>Protected</label><label for="show-private"><span><input type="checkbox" id="show-private"/></span>Private</label></div><section id="static-functions"><h2>Global Functions</h2><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/async/nexttick.js.src.html#l101">code »</a><span class="member"><a name="goog.async.nextTick.getSetImmediateEmulator_">goog.async.nextTick.getSetImmediateEmulator_</a> <span class="args">( )</span> ⇒ <code class="type">function(function())</code></span></div><p>Determines the best possible implementation to run a function as soon as
the JS event loop is idle.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>The "setImmediate" implementation.</dl></table></div></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/async/nexttick.js.src.html#l92">code »</a><span class="member"><a name="goog.async.nextTick.setImmediate_">goog.async.nextTick.setImmediate_</a> <span class="args">( )</span></span></div><p>Cache for the setImmediate implementation.</summary></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/async/nexttick.js.src.html#l206">code »</a><span class="member"><a name="goog.async.nextTick.wrapCallback_">goog.async.nextTick.wrapCallback_</a> <span class="args">( callback )</span> ⇒ <code class="type">function()</code></span></div><p>Helper function that is overrided to protect callbacks with entry point
monitor if the application monitors entry points.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>callback: <code class="type">function()</code><dd>Callback function to fire as soon as possible.</dl><tr><th>Returns<tr><td><dl>The wrapped callback.</dl></table></div></details></div></div></section></main><nav id="topnav"><div><div id="menubutton"><label for="sidenav-toggle">Menu</label></div><form id="searchbox"><div><input type="search" placeholder="Search" tabindex="1"></div></form></div></nav><nav id="sidenav"><input type="checkbox" id="sidenav-types-ctrl" /><input type="checkbox" id="sidenav-files-ctrl" /><input type="checkbox" id="sidenav-modules-ctrl" /><a id="sidenav-overview"><div><h4>Overview</h4></div></a><div id="sidenav-types"><label for="sidenav-types-ctrl"><h4>Types</h4></label><i>Loading</i></div><div id="sidenav-modules"><label for="sidenav-modules-ctrl"><h4>Modules</h4></label><i>Loading</i></div><div id="sidenav-files"><label for="sidenav-files-ctrl"><h4>Files</h4></label><i>Loading</i></div><a href="license.html"><div><h4>License</h4></div></a></nav><div id="push-footer"></div></div><footer><a href="https://github.com/jleyba/js-dossier">Generated by dossier</a></footer><script src="types.js"></script><script src="dossier.js"></script>