Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #30248 > unrolled thread
| Started by | emf <emfril@gmail.com> |
|---|---|
| First post | 2016-04-10 05:58 -0400 |
| Last post | 2016-04-25 21:48 +0200 |
| Articles | 14 — 8 participants |
Back to article view | Back to comp.lang.javascript
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
| From | emf <emfril@gmail.com> |
|---|---|
| Date | 2016-04-10 05:58 -0400 |
| Subject | Flow of execution |
| Message-ID | <ned84i$c2i$1@gioia.aioe.org> |
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.
I would greatly appreciate an explanation of the flow of execution in
JavaScript.
Thanks,
Eustace
--
Eye exercises
http://emf.neocities.org/ix/eyex.html
[toc] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2016-04-10 13:45 +0200 |
| Message-ID | <4025615.ZvNZHzr9Of@PointedEars.de> |
| In reply to | #30248 |
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
> };
> };
>
> […] the alert appears immediately after the html is loaded.
It does not. In the *actual* code, either the braces are in the wrong place
or there is an extra alert(…) call. But the part-URI that you gave is 404-
compatible.
> I would greatly appreciate an explanation of the flow of execution in
> JavaScript.
This has nothing to do with JavaScript.
And: No name, no cookies.
--
PointedEars
FAQ: <http://PointedEars.de/faq> | SVN: <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-matrix>
Please do not cc me. / Bitte keine Kopien per E-Mail.
[toc] | [prev] | [next] | [standalone]
| From | Philip Herlihy <thiswillbounceback@you.com> |
|---|---|
| Date | 2016-04-10 17:48 +0100 |
| Message-ID | <MPG.317494198a6e9105989705@news.eternal-september.org> |
| In reply to | #30248 |
In article <ned84i$c2i$1@gioia.aioe.org>, emfril@gmail.com says...
>
> 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.
>
> I would greatly appreciate an explanation of the flow of execution in
> JavaScript.
>
> Thanks,
>
> Eustace
I've noticed anomalies in execution flow in JavaScript. I can only
assume that browsers somehow "optimise" our code. Very odd...
--
Phil, London
[toc] | [prev] | [next] | [standalone]
| From | Aleksandro <aleksandro@gmx.com> |
|---|---|
| Date | 2016-04-10 15:20 -0300 |
| Message-ID | <nee5b9$dnj$1@dont-email.me> |
| In reply to | #30252 |
On 10/04/16 13:48, Philip Herlihy wrote:
> In article <ned84i$c2i$1@gioia.aioe.org>, emfril@gmail.com says...
>>
>> 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.
>>
>> I would greatly appreciate an explanation of the flow of execution in
>> JavaScript.
>>
>> Thanks,
>>
>> Eustace
>
> I've noticed anomalies in execution flow in JavaScript. I can only
> assume that browsers somehow "optimise" our code. Very odd...
Are you kidding, right? We all here know Javascript's line of execution
can diverge when a function is asynchronous.
[toc] | [prev] | [next] | [standalone]
| From | "Christoph M. Becker" <cmbecker69@arcor.de> |
|---|---|
| Date | 2016-04-11 10:15 +0200 |
| Message-ID | <nefmfh$chi$1@solani.org> |
| In reply to | #30248 |
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
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2016-04-12 00:34 +0200 |
| Message-ID | <1722790.1xdgVE6FbG@PointedEars.de> |
| In reply to | #30257 |
Christoph M. Becker wrote:
> On 10.04.2016 at 11:58, emf wrote:
>> window.onload = function () {
>> "use strict";
>> document.getElementById("start").onclick = function () {
>> requestFullScreen();
>> init();
>> alert("!"); // added alert
>> };
>> };
>>
>> […] But […] 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>.
I fail to see how your follow-up relates to the posting it is a follow-up
to.
--
PointedEars
FAQ: <http://PointedEars.de/faq> | SVN: <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-matrix>
Please do not cc me. / Bitte keine Kopien per E-Mail.
[toc] | [prev] | [next] | [standalone]
| From | emf <emfril@gmail.com> |
|---|---|
| Date | 2016-04-11 21:57 -0400 |
| Subject | Re: Flow of execution / Full Screen mode |
| Message-ID | <nehkmj$1fvp$1@gioia.aioe.org> |
| In reply to | #30257 |
On 2016-04-11 04:15, Christoph M. Becker wrote:
> 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>.
I am relieved to hear that this anomaly in the flow of execution is just
that -- an anomaly, and that the requestFullscreen seems to be the
culprit. Well, since I need it, I have to just avoid its effects until I
find something better.
BTW, after working in Firefox and checking the code with JSlint, I've
started checking the exercises on Chrome and IE that I happen to have
here, and unfortunately I've found some issue there. First in Chrome,
for which I am mostly interested next, in exercise 4
http:/;emf.neocities.org/ix/ix4.html
when it gets in full screen the letters are not projected at the bottom
of the screen, unless you exit full screen mode. This happens only in
this exercise, and not in #5 that also projects letters, and also not in
Firefox. What's causing this?
Eustace
--
Eye exercises
http://emf.neocities.org/ix/eyex.html
[toc] | [prev] | [next] | [standalone]
| From | Osmo Saarikumpu <osmo@weppipakki.com> |
|---|---|
| Date | 2016-04-13 06:55 +0300 |
| Subject | Re: Flow of execution / Full Screen mode |
| Message-ID | <nekfok$v6a$1@dont-email.me> |
| In reply to | #30264 |
On 12/04/2016 04:57, emf wrote: > BTW, after working in Firefox and checking the code with JSlint, I've > started checking the exercises on Chrome and IE that I happen to have > here, and unfortunately I've found some issue there. First in Chrome, > for which I am mostly interested next, in exercise 4 > > http:/;emf.neocities.org/ix/ix4.html Should be: http://emf.neocities.org/ix/ix4.html See if correcting the markup error (stray end tag td) has an impact. -- Best wishes, Osmo
[toc] | [prev] | [next] | [standalone]
| From | emf <emfril@gmail.com> |
|---|---|
| Date | 2016-04-13 04:41 -0400 |
| Subject | Re: Flow of execution / Full Screen mode |
| Message-ID | <nel0nm$nng$1@gioia.aioe.org> |
| In reply to | #30267 |
On 2016-04-12 23:55, Osmo Saarikumpu wrote: > On 12/04/2016 04:57, emf wrote: >> BTW, after working in Firefox and checking the code with JSlint, I've >> started checking the exercises on Chrome and IE that I happen to have >> here, and unfortunately I've found some issue there. First in Chrome, >> for which I am mostly interested next, in exercise 4 >> >> http:/;emf.neocities.org/ix/ix4.html > > Should be: > > http://emf.neocities.org/ix/ix4.html > > See if correcting the markup error (stray end tag td) has an impact. Sorry, that was a typo. In Chrome, for some reason, in this exercise the letters are shown not in the center, but lower, either I can see only the top of the letter at the bottom, or the letter is below the screen and can't be seen at all. emf -- Spherical Triangle Calculator http://emf.neocities.org/tr/spherical.html
[toc] | [prev] | [next] | [standalone]
| From | emf <emfril@gmail.com> |
|---|---|
| Date | 2016-04-15 00:22 -0400 |
| Subject | Re: Flow of execution / Full Screen mode |
| Message-ID | <nepqa8$14ek$1@gioia.aioe.org> |
| In reply to | #30270 |
On 2016-04-13 04:41, emf wrote: > On 2016-04-12 23:55, Osmo Saarikumpu wrote: >> On 12/04/2016 04:57, emf wrote: >>> BTW, after working in Firefox and checking the code with JSlint, I've >>> started checking the exercises on Chrome and IE that I happen to have >>> here, and unfortunately I've found some issue there. First in Chrome, >>> for which I am mostly interested next, in exercise 4 >>> >>> http:/;emf.neocities.org/ix/ix4.html >> >> Should be: >> >> http://emf.neocities.org/ix/ix4.html >> >> See if correcting the markup error (stray end tag td) has an impact. > > Sorry, that was a typo. In Chrome, for some reason, in this exercise > the letters are shown not in the center, but lower, either I can see > only the top of the letter at the bottom, or the letter is below the > screen and can't be seen at all. > > emf I am not sure what exactly the problem was, but after making minor -- I think -- inaccuracies in the html, css, and js code, the webpage is now running OK in both Firefox and Chrome from the website, but *not* from the local file. If someone has any idea for why this is so, I'd certainly like to know, however now this issue is rather academic. Your silence in ths newsgroup is quite articulate! Thanks, Eustace -- Eue Exercises http://emf.neocities.org/ix/eyex.html
[toc] | [prev] | [next] | [standalone]
| From | "Michael Haufe (TNO)" <tno@thenewobjective.com> |
|---|---|
| Date | 2016-04-15 12:53 -0700 |
| Subject | Re: Flow of execution / Full Screen mode |
| Message-ID | <2a5eb2b1-041b-4e1d-9945-2e001d32589f@googlegroups.com> |
| In reply to | #30280 |
On Thursday, April 14, 2016 at 11:22:42 PM UTC-5, emf wrote: > I am not sure what exactly the problem was, but after making minor -- I > think -- inaccuracies in the html, css, and js code, the webpage is now > running OK in both Firefox and Chrome from the website, but *not* from > the local file. If someone has any idea for why this is so, I'd > certainly like to know, however now this issue is rather academic. > > Your silence in ths newsgroup is quite articulate! XHR will no doubt fail these days on local filesystem due to security settings. Your network inspector will probably even show you this error. Set up a localhost site and run it from there.
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2016-04-17 12:54 +0200 |
| Subject | Re: Flow of execution / Full Screen mode |
| Message-ID | <6977737.FhmHTAiWfp@PointedEars.de> |
| In reply to | #30280 |
emf wrote: > Your silence in ths newsgroup is quite articulate! If only you would learn from it. -- PointedEars FAQ: <http://PointedEars.de/faq> | SVN: <http://PointedEars.de/wsvn/> Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-matrix> Please do not cc me. / Bitte keine Kopien per E-Mail.
[toc] | [prev] | [next] | [standalone]
| From | Nicholas Thayer <eatthecasket@gmail.com> |
|---|---|
| Date | 2016-04-25 03:06 -0700 |
| Subject | Re: Flow of execution / Full Screen mode |
| Message-ID | <718454b4-8385-46f1-8614-af4704da424b@googlegroups.com> |
| In reply to | #30287 |
y u gotta pick on teh noobz?
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2016-04-25 21:48 +0200 |
| Subject | Re: Flow of execution / Full Screen mode |
| Message-ID | <3649587.r7AruzdVtN@PointedEars.de> |
| In reply to | #30311 |
Nicholas Thayer wrote:
> y u gotta pick on teh noobz?
:. ,:
: `.-'''-.' :
:' _. ._ `: __
: (o): :(o) : |PE
: :_: :
====>_.'._<====
`-_____-'
I CAN HAZ SPELCHEK???
--
PointedEars
FAQ: <http://PointedEars.de/faq> | SVN: <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-matrix>
Please do not cc me. / Bitte keine Kopien per E-Mail.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.javascript
csiph-web