Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #30257

Re: Flow of execution

Path csiph.com!news.mixmin.net!weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From "Christoph M. Becker" <cmbecker69@arcor.de>
Newsgroups comp.lang.javascript
Subject Re: Flow of execution
Date Mon, 11 Apr 2016 10:15:55 +0200
Organization solani.org
Lines 32
Message-ID <nefmfh$chi$1@solani.org> (permalink)
References <ned84i$c2i$1@gioia.aioe.org>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding 7bit
X-Trace solani.org 1460362545 12850 eJwFwQcBACAMAzBL7DM5O9S/BBITJ59QN1eDQc4xwQwEu41mLYrXl15prOu7y1yeFdnLOR8zyhHv (11 Apr 2016 08:15:45 GMT)
X-Complaints-To abuse@news.solani.org
NNTP-Posting-Date Mon, 11 Apr 2016 08:15:45 +0000 (UTC)
User-Agent Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2
X-User-ID eJwNyUkBwDAIBEBLnAvISQn4l5DOd1zB6DA4zNc3Mdx76uPyTDFo8Kxo4NY/JBE5dJvMWHfPAw9HEK4=
In-Reply-To <ned84i$c2i$1@gioia.aioe.org>
Cancel-Lock sha1:3ixqpSnn92BVYK7Vkmzl5UoqxDQ=
X-NNTP-Posting-Host eJwNy8EBwEAEBMCWTrBcOUvov4Rk/uMKQYfBYb6+oCTJ7pmIt8fqaFELnrgnmpEr0Sn3P8/gAzhHEWo=
Xref csiph.com comp.lang.javascript:30257

Show key headers only | View raw


On 10.04.2016 at 11:58, emf wrote:

> If I add an alert at the end of the following function (from
> hmf.neocities.org/ix/is5.html):
> 
> window.onload = function () {
>     "use strict";
>     document.getElementById("start").onclick = function () {
>         requestFullScreen();
>         init();
>         alert("!"); // added alert
>     };
> };
> 
> I would expect that when the Start button is clicked first the
> requestFullScreen() would execute, then the init(), and when that one
> has finished executing, the alert would come up. But obviously my
> reasoning is wrong, because the alert appears immediately after the html
> is loaded.

<https://developer.mozilla.org/de/docs/Web/API/Element/requestFullscreen> says
(emphasis mine):

| The Element.requestFullscreen() method issues an *asynchronous*
| request to make the element be displayed full-screen.

The full specification of Element.requestFullScreen() clarifies the
details:
<https://fullscreen.spec.whatwg.org/#dom-element-requestfullscreen>.

-- 
Christoph M. Becker

Back to comp.lang.javascript | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Flow of execution emf <emfril@gmail.com> - 2016-04-10 05:58 -0400
  Re: Flow of execution Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-04-10 13:45 +0200
  Re: Flow of execution Philip Herlihy <thiswillbounceback@you.com> - 2016-04-10 17:48 +0100
    Re: Flow of execution Aleksandro <aleksandro@gmx.com> - 2016-04-10 15:20 -0300
  Re: Flow of execution "Christoph M. Becker" <cmbecker69@arcor.de> - 2016-04-11 10:15 +0200
    Re: Flow of execution Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-04-12 00:34 +0200
    Re: Flow of execution / Full Screen mode emf <emfril@gmail.com> - 2016-04-11 21:57 -0400
      Re: Flow of execution / Full Screen mode Osmo Saarikumpu <osmo@weppipakki.com> - 2016-04-13 06:55 +0300
        Re: Flow of execution / Full Screen mode emf <emfril@gmail.com> - 2016-04-13 04:41 -0400
          Re: Flow of execution / Full Screen mode emf <emfril@gmail.com> - 2016-04-15 00:22 -0400
            Re: Flow of execution / Full Screen mode "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-04-15 12:53 -0700
            Re: Flow of execution / Full Screen mode Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-04-17 12:54 +0200
              Re: Flow of execution / Full Screen mode Nicholas Thayer <eatthecasket@gmail.com> - 2016-04-25 03:06 -0700
                Re: Flow of execution / Full Screen mode Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-04-25 21:48 +0200

csiph-web