Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #30412
| From | Dr J R Stockton <reply1600@merlyn.demon.co.uk.invalid> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: Will insertBefore show it IMMEDIATELY? |
| Date | 2016-05-08 19:18 +0100 |
| Organization | Home |
| Message-ID | <pIuTXQG6L4LXFwa1@invalid.uk.co.demon.merlyn.invalid> (permalink) |
| References | <9f3351d4-6b6a-46f3-b086-41f39990ab7b@googlegroups.com> <87d1p0vp85.fsf@bsb.me.uk> <logsibheqccl6jtmlrbknqdq8ghud4qips@4ax.com> <2597183.QcWBBMbo8E@PointedEars.de> |
In comp.lang.javascript message <2597183.QcWBBMbo8E@PointedEars.de>,
Sat, 7 May 2016 22:51:48, Thomas 'PointedEars' Lahn <PointedEars@web.de>
posted:
>> In situations where I DID want the document to update immediately I had to
>> use a short setTimeout to pause execution.
>
>Still true, except that window.setTimeout() has never paused execution (that
>is a common misconception). Instead, code that is to run independent of
>window updates and would potentially block execution, is to be executed with
>window.setTimeout() or the Web Workers API.
You are, as is customary, unnecessarily pedantic whenever that enables
you to avoid being helpful.
The setTimeout call does not of itself pause execution; but it can be
used to enable execution to restart after it stops for other reasons.
it and setInterval thereby provide /sine qua non/s for the pausing of
execution.
Pseudo-Pascal, as I am not set up to test it now :
function F() ; begin
Write(1) ;
Pause(1000) ;
Write(2)
end ;
Pseudo-JavaScript :
function F() {
Write(1)
setTimeout(G, 1000)
}
function G() :
Write(2)
;
RBTD.
--
(c) John Stockton, Surrey, UK. ¬@merlyn.demon.co.uk Turnpike v6.05 MIME.
Merlyn Web Site < > - FAQish topics, acronyms, & links.
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Will insertBefore show it IMMEDIATELY? bit-naughty@hotmail.com - 2016-05-04 23:06 -0700
Re: Will insertBefore show it IMMEDIATELY? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-05-05 10:16 +0100
Re: Will insertBefore show it IMMEDIATELY? Steve L <x@y.z> - 2016-05-07 15:40 -0400
Re: Will insertBefore show it IMMEDIATELY? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-05-07 22:51 +0200
Re: Will insertBefore show it IMMEDIATELY? Dr J R Stockton <reply1600@merlyn.demon.co.uk.invalid> - 2016-05-08 19:18 +0100
Re: Will insertBefore show it IMMEDIATELY? "Christoph M. Becker" <cmbecker69@arcor.de> - 2016-05-06 12:53 +0200
Re: Will insertBefore show it IMMEDIATELY? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-05-06 13:11 +0200
Re: Will insertBefore show it IMMEDIATELY? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-05-06 14:08 +0200
Re: Will insertBefore show it IMMEDIATELY? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-05-06 16:10 +0200
Re: Will insertBefore show it IMMEDIATELY? bit-naughty@hotmail.com - 2016-05-10 00:53 -0700
Re: Will insertBefore show it IMMEDIATELY? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-05-10 10:38 +0200
Re: Will insertBefore show it IMMEDIATELY? Osmo Saarikumpu <osmo@weppipakki.com> - 2016-05-11 17:34 +0300
csiph-web