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


Groups > comp.lang.javascript > #20591 > unrolled thread

client side hour glass icon?

Started bySpreadTooThin <bjobrien62@gmail.com>
First post2013-07-08 18:10 -0700
Last post2013-07-09 10:53 -0700
Articles 17 — 9 participants

Back to article view | Back to comp.lang.javascript


Contents

  client side hour glass icon? SpreadTooThin <bjobrien62@gmail.com> - 2013-07-08 18:10 -0700
    Re: client side hour glass icon? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2013-07-09 09:51 +0200
    Re: client side hour glass icon? Denis McMahon <denismfmcmahon@gmail.com> - 2013-07-09 08:53 +0000
      Re: client side hour glass icon? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-07-09 22:18 +0200
        Re: client side hour glass icon? Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2013-07-10 08:20 +0200
          Re: client side hour glass icon? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-07-10 21:27 +0200
        Re: client side hour glass icon? John Harris <niam@jghnorth.org.uk.invalid> - 2013-07-10 14:46 +0100
          Re: client side hour glass icon? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-07-10 15:57 +0200
            Pointless rants (Was: Re: client side hour glass icon?) "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2013-07-10 19:18 +0300
              Re: Pointless rants Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-07-10 19:45 +0200
            Re: client side hour glass icon? danca <ynnadrebyc@tiscalinet.it> - 2013-07-10 18:31 +0200
            Re: client side hour glass icon? John Harris <niam@jghnorth.org.uk.invalid> - 2013-07-11 10:06 +0100
              Re: client side hour glass icon? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-07-11 18:32 +0200
                Re: client side hour glass icon? John Harris <niam@jghnorth.org.uk.invalid> - 2013-07-12 16:28 +0100
                  ECMAScript (was: client side hour glass icon?) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-07-12 21:12 +0200
                    Re: ECMAScript (was: client side hour glass icon?) John Harris <niam@jghnorth.org.uk.invalid> - 2013-07-13 17:01 +0100
    Re: client side hour glass icon? Danny <dann90038@gmail.com> - 2013-07-09 10:53 -0700

#20591 — client side hour glass icon?

FromSpreadTooThin <bjobrien62@gmail.com>
Date2013-07-08 18:10 -0700
Subjectclient side hour glass icon?
Message-ID<0b094737-1b40-41d2-a114-042773825466@googlegroups.com>
I have a server side function that can take a while to complete.
During that time the user should see an hour glass icon on that their client web page.
I thought there must be a some java script to do this.
Help?
TIA.

[toc] | [next] | [standalone]


#20592

From"Evertjan." <exxjxw.hannivoort@inter.nl.net>
Date2013-07-09 09:51 +0200
Message-ID<XnsA1F86439C7614eejj99@194.109.133.133>
In reply to#20591
SpreadTooThin wrote on 09 jul 2013 in comp.lang.javascript:

> I have a server side function that can take a while to complete.
> During that time the user should see an hour glass icon on that their
> client web page. I thought there must be a some java script to do
> this. 

This NG is not about scrips of Java,
but about the language Javascript,
though some here even doubt that.

-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

[toc] | [prev] | [next] | [standalone]


#20594

FromDenis McMahon <denismfmcmahon@gmail.com>
Date2013-07-09 08:53 +0000
Message-ID<krgj2t$4if$2@dont-email.me>
In reply to#20591
On Mon, 08 Jul 2013 18:10:00 -0700, SpreadTooThin wrote:

> I have a server side function that can take a while to complete.
> During that time the user should see an hour glass icon on that their
> client web page.
> I thought there must be a some java script to do this.
> Help?

In javascript the following:

document.body.style.cursor = "wait";

might, under some conditions, at certain phases of the moon[1], when the 
wind is in the appropriate direction[2], have something approaching the 
desired effect.

I think:

document.body.style.cursor = "";

sets it back to the default.[3]

[1] No I don't know which ones.
[2] See [1]
[3] Could be wrong on this, in which case I have no idea how to reset it, 
but if I am wrong I'm sure someone will be along shortly with details.

-- 
Denis McMahon, denismfmcmahon@gmail.com

[toc] | [prev] | [next] | [standalone]


#20599

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2013-07-09 22:18 +0200
Message-ID<2695770.PYp8NcyyIf@PointedEars.de>
In reply to#20594
Denis McMahon wrote:

> On Mon, 08 Jul 2013 18:10:00 -0700, SpreadTooThin wrote:
>> I have a server side function that can take a while to complete.
>> During that time the user should see an hour glass icon on that their
>> client web page.
>> I thought there must be a some java script to do this.
>> Help?
> 
> In javascript the following:

There is no javascript: <http://PointedEars.de/es-matrix>
 
> document.body.style.cursor = "wait";

This is client-side DOM scripting (with an ECMAScript implementation, but 
DOM APIs are *language-independent* or, in W3C terminology, “language-
neutral”).

See also <http://en.wikipedia.org/wiki/Document_Object_Model> pp.
 
> might, under some conditions, at certain phases of the moon[1], when the
> wind is in the appropriate direction[2], have something approaching the
> desired effect.

To be precise, while the “cursor” property is inherited by default [0], you 
may have declared the “cursor” property on certain descendant elements or 
the UA may have declared it in its basic stylesheet for you (for example, it 
makes sense that a text “input” element would use “cursor: text” by default, 
and an “a” link element would use “cursor: pointer”).  As result, setting 
the “wait” cursor on the “body” element may not affect the cursor on all 
descendant nodes.

There are several ways to work around this.  You can define a rule

  body.wait,
  body.wait *
  {
    cursor: wait !important;
  }

Then you set the “class” attribute of the body element dynamically:

  var body = document.body;
  var _classes = body.className;
  body.className = (_classes ? _classes + " wait" : "wait");

and set it back

  var body = document.body;
  body.className = body.className.replace(/(^|\s+)wait$/, "");

(Or, tested: 

  jsx.dom.css.addClassName(document.body, "wait", true);

and

  jsx.dom.css.removeClassName(document.body, "wait");

See [1].

Recent DOM implementations also implement the “classList” property of DOM 
Level 4 (WD) [2]:

  document.body.classList.add("wait");

and

  document.body.classList.remove("wait");

respectively.  JSX:dom/css.js does not make use of it yet, but will.)

However, you may have to set the “className” property or “cursor” style 
property on elements – jsx.dom.css.setStyleProperty() [1] can help you 
there; I moved it to the jsx.dom.css namespace just yesterday –, or add 
appropriate “!important” declarations for the “.wait” context, for which 
there are selectors with greater specificity.  But at least the UI keeps 
responsive.

If instead you *want* the UI to be *not* responsive while processing, you 
can create a new (semi-)transparent element on top of all other related 
elements, and give it the appropriate cursor style.  For example:

  var div = document.createElement("div");
  div.style.zIndex = 1701;
  div.style.position = "fixed";
  div.style.top = "0";
  div.style.left = "0";
  div.style.bottom = "0";
  div.style.right = "0";
  div.style.cursor = "wait";

(Or

  var div = jsx.dom.createElementFromObj({
    type: "div",
    properties: {
      style: {
        position: "fixed",
        top: "0",
        right: "0",
        bottom: "0",
        left: "0",
        zIndex: 1701,
        "background-color": "rgba(0, 0, 0, 0.5)",
        cursor: "wait"
      }
    }
  });

See [3].)

  document.body.appendChild(div);

You can remove it when not needed anymore:

  document.body.removeChild(div);
 
> I think:
> 
> document.body.style.cursor = "";
> 
> sets it back to the default.[3]

It does (as with all style shorthand properties; CSSOM (WD/ED) attempts to 
standardize this proprietary, but interoperable behavior [4]), but see 
above.

________
[0] <http://www.w3.org/TR/CSS2/ui.html#propdef-cursor>
[1] 
<http://PointedEars.de/websvn/filedetails.php?repname=JSX&path=%2Ftrunk%2Fdom%2Fcss.js>
[2] <http://www.w3.org/TR/dom/#dom-element-classlist>
[3] 
<http://PointedEars.de/websvn/filedetails.php?repname=JSX&path=%2Ftrunk%2Fdom.js>
[4] <http://www.w3.org/TR/cssom/#the-cssstyledeclaration-interface>
-- 
PointedEars

Twitter: @PointedEars2
Please do not Cc: me. / Bitte keine Kopien per E-Mail.

[toc] | [prev] | [next] | [standalone]


#20601

FromCezary Tomczyk <cezary.tomczyk@gmail.com>
Date2013-07-10 08:20 +0200
Message-ID<kriu4i$kcv$1@dont-email.me>
In reply to#20599
On 2013-07-09 22:18, Thomas 'PointedEars' Lahn wrote:
[...]

>    var div = document.createElement("div");
>    div.style.zIndex = 1701;
>    div.style.position = "fixed";
>    div.style.top = "0";
>    div.style.left = "0";
>    div.style.bottom = "0";
>    div.style.right = "0";
>    div.style.cursor = "wait";
>
> (Or
>
>    var div = jsx.dom.createElementFromObj({
>      type: "div",
>      properties: {
>        style: {
>          position: "fixed",
>          top: "0",
>          right: "0",
>          bottom: "0",
>          left: "0",
>          zIndex: 1701,
>          "background-color": "rgba(0, 0, 0, 0.5)",
>          cursor: "wait"
>        }
>      }
>    });
[...]

Or

var div = document.createElement('div');
div.style.cssText = 'z-index: 1701; position: fixed; top: 0; left: 0; 
bottom: 0; right: 0; cursor: wait;';

Just one thing: shouldn't be here 0px instead of 0? Just regarding 
http://devtoolsecrets.com/secret/editing-incrementing-css-values.html

-- 
Cezary Tomczyk
http://www.ctomczyk.pl/

[toc] | [prev] | [next] | [standalone]


#20608

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2013-07-10 21:27 +0200
Message-ID<1514651.RQZaLltAgF@PointedEars.de>
In reply to#20601
Cezary Tomczyk wrote:

> On 2013-07-09 22:18, Thomas 'PointedEars' Lahn wrote:
> [...]
> 
>>    var div = document.createElement("div");
>>    div.style.zIndex = 1701;
>>    div.style.position = "fixed";
>>    div.style.top = "0";
>>    div.style.left = "0";
>>    div.style.bottom = "0";
>>    div.style.right = "0";
>>    div.style.cursor = "wait";
>>
>> (Or
>>
>>    var div = jsx.dom.createElementFromObj({
>>      type: "div",
>>      properties: {
>>        style: {
>>          position: "fixed",
>>          top: "0",
>>          right: "0",
>>          bottom: "0",
>>          left: "0",
>>          zIndex: 1701,
>>          "background-color": "rgba(0, 0, 0, 0.5)",
>>          cursor: "wait"
>>        }
>>      }
>>    });
> [...]
> 
> Or
> 
> var div = document.createElement('div');
> div.style.cssText = 'z-index: 1701; position: fixed; top: 0; left: 0;
> bottom: 0; right: 0; cursor: wait;';

The Matrix has you.  This also works in IE 6.0.2800.1106, although I cannot 
say at this time if it works everywhere where client-side CSS scripting is 
supported.

I cannot prove it yet, but previous experience suggests that the first 
approach, implemented in jsx.dom.css.setStyleProperty() as called by 
jsx.dom.createElementFromObj(), works everywhere short of NN4, friends and 
older relatives.

Another advantage of jsx.dom.createElementFromObj() over your approach is 
its versatility with regard to properties and tree depth.  If you build 
document subtrees from Object instances, you can define entire layouts in 
one object instead of lengthy, more error-prone string values, or tedious 
and more error-prone “RY” DOM statements.
 
> Just one thing: shouldn't be here 0px instead of 0? Just regarding
> http://devtoolsecrets.com/secret/editing-incrementing-css-values.html

If you intend to use the CSS Inspector for experimenting with suitable 
values as described, *and* you not want to type the unit (e.g., “px”) before 
you can do that, you should write "0px" or whatever unit of length you 
prefer.  Otherwise it is just a waste of space.

-- 
PointedEars

Twitter: @PointedEars2
Please do not Cc: me. / Bitte keine Kopien per E-Mail.

[toc] | [prev] | [next] | [standalone]


#20603

FromJohn Harris <niam@jghnorth.org.uk.invalid>
Date2013-07-10 14:46 +0100
Message-ID<gcpqt8llhinrn2q5mh5rfvd00f2ta05760@4ax.com>
In reply to#20599
On Tue, 09 Jul 2013 22:18 +0200, Thomas 'PointedEars' Lahn
<PointedEars@web.de> wrote:


  <snip>
>There is no javascript: <http://PointedEars.de/es-matrix>
  <snip>

To new readers, what Thomas means is :

a) If you think 'javascript' is one language then you are wrong. There
are several different environments using the same core language,
ECMAScript, and numerous differences between products and versions in
the same environment.

b) On the other hand, if you already understand (a) then 'javascript'
is the name of a class of languages with something in common, but
Thomas flatly refuses to discuss the idea of a short name for this
class.

  John

[toc] | [prev] | [next] | [standalone]


#20604

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2013-07-10 15:57 +0200
Message-ID<4759479.fX00ubetRW@PointedEars.de>
In reply to#20603
John Harris wrote:

> Thomas 'PointedEars' Lahn <PointedEars@web.de> wrote:
>   <snip>
>> There is no javascript: <http://PointedEars.de/es-matrix>
>   <snip>
> 
> To new readers, what Thomas means is :
> 
> a) If you think 'javascript' is one language then you are wrong. There
> are several different environments using the same core language,
> ECMAScript, and numerous differences between products and versions in
> the same environment.

No, you still don't get it.

-- 
PointedEars

Twitter: @PointedEars2
Please do not Cc: me. / Bitte keine Kopien per E-Mail.

[toc] | [prev] | [next] | [standalone]


#20605 — Pointless rants (Was: Re: client side hour glass icon?)

From"Jukka K. Korpela" <jkorpela@cs.tut.fi>
Date2013-07-10 19:18 +0300
SubjectPointless rants (Was: Re: client side hour glass icon?)
Message-ID<krk157$9mf$1@dont-email.me>
In reply to#20604
2013-07-10 16:57, a troll wrote:

> No, you still don't get it.

Your point about client side hour glass icon (the announced topic of 
this discussion)? I wonder if you had one.

As you repeatedly lecture on Usenet conduct (while violating many rules 
of conduct yourself), ignorance and incompetence is no excuse for your 
not changing the Subject line when your ranting has absolutely nothing 
to do with the topic given there.

If you marked (by suitable choice of Subject line) all your nonsensical 
propaganda articles against the name "JavaScript" (in some spelling) 
properly as rants against the name, it would be easier to check whether 
you ever have something to contribute to the topics that other people 
find interesting.

-- 
Yucca, http://www.cs.tut.fi/~jkorpela/

[toc] | [prev] | [next] | [standalone]


#20607 — Re: Pointless rants

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2013-07-10 19:45 +0200
SubjectRe: Pointless rants
Message-ID<42928200.zFSQuNHlMR@PointedEars.de>
In reply to#20605
Jukka K. Korpela wrote:

> 2013-07-10 16:57, a troll wrote:
>> No, you still don't get it.
> 
> Your point about client side hour glass icon (the announced topic of
> this discussion)? I wonder if you had one.

That might have to do with the fact that you did not read what I posted, 
only what was quoted from it.

-- 
PointedEars

Twitter: @PointedEars2
Please do not Cc: me. / Bitte keine Kopien per E-Mail.

[toc] | [prev] | [next] | [standalone]


#20606

Fromdanca <ynnadrebyc@tiscalinet.it>
Date2013-07-10 18:31 +0200
Message-ID<krk28l$cqb$1@nnrp-beta.newsland.it>
In reply to#20604
Il 10/07/2013 15:57, Thomas 'PointedEars' Lahn ha scritto:
> John Harris wrote:
>
>> Thomas 'PointedEars' Lahn <PointedEars@web.de> wrote:
>>    <snip>

There is no PointedEars.
Please, get a real surname.

]:-D

(Sorry, It was impossible to resist.)
Dan

[toc] | [prev] | [next] | [standalone]


#20618

FromJohn Harris <niam@jghnorth.org.uk.invalid>
Date2013-07-11 10:06 +0100
Message-ID<ftsst8hgbo3ocimdlo8leh3nl76ja1g6g7@4ax.com>
In reply to#20604
On Wed, 10 Jul 2013 15:57:29 +0200, Thomas 'PointedEars' Lahn
<PointedEars@web.de> wrote:

>John Harris wrote:
>
>> Thomas 'PointedEars' Lahn <PointedEars@web.de> wrote:
>>   <snip>
>>> There is no javascript: <http://PointedEars.de/es-matrix>
>>   <snip>
>> 
>> To new readers, what Thomas means is :
>> 
>> a) If you think 'javascript' is one language then you are wrong. There
>> are several different environments using the same core language,
>> ECMAScript, and numerous differences between products and versions in
>> the same environment.
>
>No, you still don't get it.

In what way have I misrepresented your views ?

  Remember, you have written 
"Some people talk about a programming language they call “javascript”.
This is supposed to be one fully specified and universally implemented
programming language" ...
  and
"there are several implementations of ECMAScript that are widely
distributed, primarily through web browsers".

  John

[toc] | [prev] | [next] | [standalone]


#20626

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2013-07-11 18:32 +0200
Message-ID<3157317.2gNO7UWsCk@PointedEars.de>
In reply to#20618
At the risk of feeding a troll, yet another attempt to explain this to you.

John Harris wrote:

> Thomas 'PointedEars' Lahn wrote:
>> John Harris wrote:
>>> Thomas 'PointedEars' Lahn <PointedEars@web.de> wrote:
>>>   <snip>
>>>> There is no javascript: <http://PointedEars.de/es-matrix>
>>>   <snip>
>>> 
>>> To new readers, what Thomas means is :
>>> 
>>> a) If you think 'javascript' is one language then you are wrong. There
>>> are several different environments using the same core language,
>>> ECMAScript, and numerous differences between products and versions in
>>> the same environment.
>>
>> No, you still don't get it.
> 
> In what way have I misrepresented your views ?

They are not views.
 
>   Remember, you have written

You (of all people) should not presume to remind me of that which I know so 
well.

> "Some people talk about a programming language they call “javascript”.

(Actually, there are typographical double-quotes in the original text.)

> This is supposed to be one fully specified and universally implemented
> programming language" ...

Perhaps I chose an ambiguous wording; English is not my native language.  
It means: It is “supposed to be” that in those people's understanding 
of the topic, but actually it is not (because it does not exist as such).  
The comparison of implementations vs. the standard and each other in the 
ECMAScript Support Matrix makes that obvious.  (Another Matrix would show 
that much the same applies to DOM implementations, although there, too, 
many previous differences disappear with time while new ones emerge.)

>   and
> "there are several implementations of ECMAScript that are widely
> distributed, primarily through web browsers".

“Several (*different*) *implementations* of *ECMAScript*”; _not_ “the same 
core language”.  Surely you can see that a different implementation means a 
*different* (core) language, particularly in the case of ECMAScript.  The 
differences between the ECMAScript implementations have nothing to do with 
different runtime environments (nowadays): You can find Mozilla JavaScript 
in Mozilla browsers, SeaMonkey, and NES-compatibles; Microsoft JScript in 
IE, WSH and IIS; Google V8 JavaScript in Chromium, the Android browser 
component, and in node.js etc.

Also, features provided by a runtime environment, like a DOM implementation, 
do not belong to the respective ECMAScript implementation (the “core 
language”); they are language-independent (with the historical exception of 
JavaScript 1.0 to 1.3 in Netscape Navigator 2.0 to 4.x as the notion of a 
“DOM” or “AOM” is a later development – at the time people were simply 
talking about “DHTML”).

HTH

-- 
PointedEars

Twitter: @PointedEars2
Please do not Cc: me. / Bitte keine Kopien per E-Mail.

[toc] | [prev] | [next] | [standalone]


#20637

FromJohn Harris <niam@jghnorth.org.uk.invalid>
Date2013-07-12 16:28 +0100
Message-ID<q480u8p71pvg067aoqv2jq8di3digr9ctn@4ax.com>
In reply to#20626
On Thu, 11 Jul 2013 18:32:52 +0200, Thomas 'PointedEars' Lahn
<PointedEars@web.de> wrote:

>At the risk of feeding a troll, yet another attempt to explain this to you.

Ad hominem, as usual.


>John Harris wrote:
>
>> Thomas 'PointedEars' Lahn wrote:
>>> John Harris wrote:
>>>> Thomas 'PointedEars' Lahn <PointedEars@web.de> wrote:
>>>>   <snip>
>>>>> There is no javascript: <http://PointedEars.de/es-matrix>
>>>>   <snip>
>>>> 
>>>> To new readers, what Thomas means is :
>>>> 
>>>> a) If you think 'javascript' is one language then you are wrong. There
>>>> are several different environments using the same core language,
>>>> ECMAScript, and numerous differences between products and versions in
>>>> the same environment.
>>>
>>> No, you still don't get it.
>> 
>> In what way have I misrepresented your views ?
>
>They are not views.

Oxford Dictionary of English :-
  view (3) : a particular way of considering or regarding something;
an attitude or opinion. Example : strong political views.


>>   Remember, you have written
>
>You (of all people) should not presume to remind me of that which I know so 
>well.

So I should just have written "You have written" so you could complain
that I haven't provided any evidence. Ho, ho.


>> "Some people talk about a programming language they call ?javascript?.
>
>(Actually, there are typographical double-quotes in the original text.)
>
>> This is supposed to be one fully specified and universally implemented
>> programming language" ...
>
>Perhaps I chose an ambiguous wording; English is not my native language.  
>It means: It is “supposed to be” that in those people's understanding 
>of the topic, but actually it is not 

Which is what I understood you to say. There was nothing wrong with
the English, though perhaps a bit advanced for some parts of the
world.


>(because it does not exist as such).  
>The comparison of implementations vs. the standard and each other in the 
>ECMAScript Support Matrix makes that obvious.  (Another Matrix would show 
>that much the same applies to DOM implementations, although there, too, 
>many previous differences disappear with time while new ones emerge.)

Which is what my paraphrase said, though "using" could have been
weakened to "purporting to use".


>>   and
>> "there are several implementations of ECMAScript that are widely
>> distributed, primarily through web browsers".
>
>“Several (*different*) *implementations* of *ECMAScript*”; _not_ “the same 
>core language”.  

"Core language" is the ECMA 262 terminology.


>Surely you can see that a different implementation means a 
>*different* (core) language, particularly in the case of ECMAScript.  The 
>differences between the ECMAScript implementations 

If an implementation doesn't obey some part of some issue of ECMA 262
then it isn't implementing ECMAScript, even if it obeys most of it.


>have nothing to do with 
>different runtime environments (nowadays): You can find Mozilla JavaScript 
>in Mozilla browsers, SeaMonkey, and NES-compatibles; Microsoft JScript in 
>IE, WSH and IIS; Google V8 JavaScript in Chromium, the Android browser 
>component, and in node.js etc.

Yes, it's messy, isn't it.


>Also, features provided by a runtime environment, like a DOM implementation, 
>do not belong to the respective ECMAScript implementation (the “core 
>language”); 

As ECMA 262 says :
"ECMAScript can provide core scripting capabilities for a variety of
host environments, and therefore the core scripting language is
specified in this document apart from any particular host
environment."

In other words, a DOM or any other environment-manipulating stucture
is not part of the core language, as you say, and as I said.

Contrast this with C++ and Java where the standard libraries are
specified as part of the language. The same could be said of Date
objects.


>they are language-independent (with the historical exception of 
>JavaScript 1.0 to 1.3 in Netscape Navigator 2.0 to 4.x as the notion of a 
>“DOM” or “AOM” is a later development – at the time people were simply 
>talking about “DHTML”).

They may be specified in a language-independent way, but there aren't
many example where the language is not something close to ECMAScript.


>HTH

Not really, you still haven't said where I didn't summarise your
convictions.

  John

[toc] | [prev] | [next] | [standalone]


#20640 — ECMAScript (was: client side hour glass icon?)

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2013-07-12 21:12 +0200
SubjectECMAScript (was: client side hour glass icon?)
Message-ID<3314816.sApdRT1E2j@PointedEars.de>
In reply to#20637
John Harris wrote:

> Thomas 'PointedEars' Lahn wrote:
>> At the risk of feeding a troll, yet another attempt to explain this to
>> you.
> 
> Ad hominem, as usual.

Neither one applies.  But if the shoe fits…

>> John Harris wrote:
>>> Thomas 'PointedEars' Lahn wrote:
>>>> John Harris wrote:
>>>>> Thomas 'PointedEars' Lahn <PointedEars@web.de> wrote:
>>>>>   <snip>
>>>>>> There is no javascript: <http://PointedEars.de/es-matrix>
>>>>>   <snip>
>>>>> 
>>>>> To new readers, what Thomas means is :
>>>>> 
>>>>> a) If you think 'javascript' is one language then you are wrong. There
>>>>> are several different environments using the same core language,
>>>>> ECMAScript, and numerous differences between products and versions in
>>>>> the same environment.
>>>>
>>>> No, you still don't get it.
>>> 
>>> In what way have I misrepresented your views ?
>>
>> They are not views.
> 
> Oxford Dictionary of English :-
>   view (3) : a particular way of considering or regarding something;
> an attitude or opinion. Example : strong political views.

But it is neither an attitude nor an opinion.

>>>   Remember, you have written
>>
>> You (of all people) should not presume to remind me of that which I know
>> so well.
> 
> So I should just have written "You have written" […]

Yes.
 
>>> "Some people talk about a programming language they call ?javascript?.
>>
>> (Actually, there are typographical double-quotes in the original text.)
>>
>>> This is supposed to be one fully specified and universally implemented
>>> programming language" ...
>>
>> Perhaps I chose an ambiguous wording; English is not my native language.
>> It means: It is “supposed to be” that in those people's understanding
>> of the topic, but actually it is not
> 
> Which is what I understood you to say. There was nothing wrong with
> the English, though perhaps a bit advanced for some parts of the
> world.

Thank you.

>> (because it does not exist as such). The comparison of implementations
>> vs. the standard and each other in the ECMAScript Support Matrix makes
>> that obvious.  (Another Matrix would show that much the same applies to
>> DOM implementations, although there, too, many previous differences
>> disappear with time while new ones emerge.)
> 
> Which is what my paraphrase said, though "using" could have been
> weakened to "purporting to use".

No, you have stated there would be one core language common to several 
different environments (with the subtext “*all* environments”).  This is a 
misinterpretation of what I said because I said the opposite: There is _not_ 
such a language.

>>>   and
>>> "there are several implementations of ECMAScript that are widely
>>> distributed, primarily through web browsers".
>>
>> “Several (*different*) *implementations* of *ECMAScript*”; _not_ “the
>> same core language”.
> 
> "Core language" is the ECMA 262 terminology.

But it is used there with another meaning than you use it.

>>Surely you can see that a different implementation means a
>>*different* (core) language, particularly in the case of ECMAScript.  The
>>differences between the ECMAScript implementations
> 
> If an implementation doesn't obey some part of some issue of ECMA 262
> then it isn't implementing ECMAScript, even if it obeys most of it.

Incorrect, see the “Conformance” section.  Also, several implementors 
disagree with you, saying that they implemented ECMAScript, even though in 
some features of their implementations there are diversions from the (used 
Edition of the) standard that cannot be explained by the allowances in that 
section.

One must allow for the possibility of an “incomplete”, “not conforming” or 
“not fully conforming” implementation of ECMAScript because otherwise the 
term “conforming implementation” in the Specification contains redundancy, 
and no *reasonable* way of describing and discussing the connection between 
implementation and standard is left.

>> have nothing to do with different runtime environments (nowadays): You
>> can find Mozilla JavaScript in Mozilla browsers, SeaMonkey, and NES-
>> compatibles; Microsoft JScript in IE, WSH and IIS; Google V8 JavaScript
>> in Chromium, the Android browser component, and in node.js etc.
> 
> Yes, it's messy, isn't it.

It is the reason for and the natural result of the “Conformance” section in 
all versions and Editions of the ECMAScript Language Specification so far.

>> Also, features provided by a runtime environment, like a DOM
>> implementation, do not belong to the respective ECMAScript implementation
>> (the “core language”);
> 
> As ECMA 262 says :

Which Edition are you citing?

> "ECMAScript can provide core scripting capabilities for a variety of
> host environments, and therefore the core scripting language is
> specified in this document apart from any particular host
> environment."
> 
> In other words, a DOM or any other environment-manipulating stucture
> is not part of the core language, as you say, and as I said.

Yes.  But it also says that the “core scripting language” is an 
*implementation* of ECMAScript.  Keep in mind that there can only be 
*implementations* of ECMAScript, however they are called, in practice.
And implementations differ.  So contrary to what you stated (and how you 
misinterpreted my statements), there is _not_ *one* core language; there
are several that have a common root.
 
> Contrast this with C++ and Java where the standard libraries are
> specified as part of the language. The same could be said of Date
> objects.

The “standard library”, so to speak, of ECMAScript borrows from the Java API 
(particularly java.lang and java.util) because the first Edition was based 
on common features of JavaScript 1.1 and JScript 1.0. [0]  JavaScript was 
intended by Netscape to be a complement to Sun's Java; with a simpler, yet 
similar, syntax suitable for beginners, and to allow for programming in HTML 
documents which the Java plugin could not provide. [1][2]  JScript 1.0 and 
the MSHTML 3.0 DOM API (as you would call it today) both are the result of 
reverse engineering of JavaScript 1.0 (which contains the Netscape 2.0 DOM 
API, as you would call it today) [3], with Microsoft's extensions.

>> they are language-independent (with the historical exception of
>> JavaScript 1.0 to 1.3 in Netscape Navigator 2.0 to 4.x as the notion of a
>> “DOM” or “AOM” is a later development – at the time people were simply
>> talking about “DHTML”).
> 
> They may be specified in a language-independent way, but there aren't
> many example where the language is not something close to ECMAScript.

You have not seen enough examples.  I could name at least three programming 
languages in which DOM interfaces are implemented and used, that are _not_ 
ECMAScript implementations.  Indeed, if you search signed out for DOM 
interface names on Google, in many cases the *Java* API documentation is 
among the first hits.

>> HTH
> 
> Not really, you still haven't said where I didn't summarise your
> convictions.

They are not convictions either.  It is a mistake to demote facts to views, 
attitudes, opinions, or convictions because you cannot or do not want to 
deal with them.  Truth of reality, reality of truth.  That which is
gives you freedom.

_________
[0] Ecma International (Juni 1997). Standard ECMA-262 – ECMAScript: A
    general-purpose, cross-platform programming language.  Section 2.
    <http://www.ecma-international.org/publications/files/ECMA-ST-ARCH/ECMA-262,%201st%20edition,%20June%201997.pdf>
[1] Krill, Paul (2008-06-23). „JavaScript creator ponders past, future“.
    In: InfoWorld. Developer World.
    <http://www.infoworld.com/d/developer-world/javascript-creator-ponders-past-future-704>
    (retrieved 2011-12-22).
[2] Hamilton, Naomi (2008-07-31). „The A-Z of Programming Languages:
    JavaScript“. In: Computerworld. The A-Z of Programming Languages.
    <http://www.computerworld.com.au/article/255293/a-z_programming_languages_javascript/>
    (retrieved 2011-12-31)
[3] YUI Theater (2007). Douglas Crockford: The JavaScript Programming
    Language. Ca. 00:04:00.
    <http://www.youtube.com/watch?v=v2ifWcnQs6M> (retrieved 2012-02-13).
-- 
PointedEars

Twitter: @PointedEars2
Please do not Cc: me. / Bitte keine Kopien per E-Mail.

[toc] | [prev] | [next] | [standalone]


#20645 — Re: ECMAScript (was: client side hour glass icon?)

FromJohn Harris <niam@jghnorth.org.uk.invalid>
Date2013-07-13 17:01 +0100
SubjectRe: ECMAScript (was: client side hour glass icon?)
Message-ID<ueu2u8tt35gdc9pbg42t9jkd8iktibv7fa@4ax.com>
In reply to#20640
On Fri, 12 Jul 2013 21:12:19 +0200, Thomas 'PointedEars' Lahn
<PointedEars@web.de> wrote:

>John Harris wrote:
>
>> Thomas 'PointedEars' Lahn wrote:


  <snip>
>>> You (of all people) should not presume to remind me of that which I know
>>> so well.
>> 
>> So I should just have written "You have written" […]
>
>Yes.

I believe that you are lying.

One day you will quote part of the ECMAScript syntax specification and
that will change my belief into a fact.


  <snip>
>No, you have stated there would be one core language common to several 
>different environments (with the subtext “*all* environments”).  This is a 
>misinterpretation of what I said because I said the opposite: There is _not_ 
>such a language.

What I actually said was 

  "If you think 'javascript' is one language then you are wrong."

The rest of the paragraph was a very brief explanation of why it's
wrong. If you disagree with the exact wording of the explanation or
its length you should say so instead of implying that I said the
opposite of the first sentence.


  <snip>
>Also, several implementors 
>disagree with you, saying that they implemented ECMAScript, even though in 
>some features of their implementations there are diversions from the (used 
>Edition of the) standard that cannot be explained by the allowances in that 
>section.

Goodness gracious! Are you seriously saying you believe a statement by
marketing ?


  <snip>
>They are not convictions either.  It is a mistake to demote facts to views, 
>attitudes, opinions, or convictions because you cannot or do not want to 
>deal with them.

There are facts that you sincerely believe to be facts and facts that
you furiously deny to be facts. Your view or conviction is different
in the two cases, so it's necessary to say whether it's your view,
etc.


  <snip>

  John

[toc] | [prev] | [next] | [standalone]


#20598

FromDanny <dann90038@gmail.com>
Date2013-07-09 10:53 -0700
Message-ID<71aa2747-6c35-4d3f-96e0-2a83d7e5de81@googlegroups.com>
In reply to#20591
To SpreadTooThin

without knowing much specifics, I'd say you could just provide an animated .gif picture with some cyclical progress iteration, or an animated hourglass turning upside-down every so many seconds.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.javascript


csiph-web