Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #17654
| Message-ID | <7546793.cFEfZxNJhn@PointedEars.de> (permalink) |
|---|---|
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
| Organization | PointedEars Software (PES) |
| Date | 2012-12-10 16:04 +0100 |
| Subject | Re: baffled trying to call style.display value |
| Newsgroups | comp.lang.javascript |
| References | <8b828e29-6604-45c7-9166-f17e5b39724d@googlegroups.com> <b4e1ee7a-a68b-40cc-bafc-af3a473b03f6@o30g2000vbu.googlegroups.com> <1609195.3fhKV6gEnR@PointedEars.de> <f1d77ed8-ae96-454f-8ebd-409791470768@o6g2000yql.googlegroups.com> |
| Followup-To | comp.lang.javascript |
Followups directed to: comp.lang.javascript
Scott Sauyet wrote:
> Thomas 'PointedEars' Lahn wrote:
>> Scott Sauyet wrote:
>>> JeffG wrote:
>>>> [ ... ]
>>>> For some reason, the function is unable to return the style.display
>>>> value that was set by the CSS file [ ... ]
>>> `someElement.style` represents the collection of properties known to
>>> the Javascript engine, which is, chiefly, the ones set by that
>>> engine.
>> What can one say to such a mindbogglingly large amount of misinformation
>> in just one sentence? Nonsense? Bullshit? Words fail to describe it.
>
> You're right. How could I have been so careless? An updated version
> that carefully takes account of the worthwhile parts of your critique
> is below.
>
>> The “style” property of DOM element objects refers to an object that
>> implements the CSSStyleDeclaration interface, whose properties in turn
>> have values that reflect the properties declared in the “style” attribute
>> value of the represented element.
>
> Yes it's an object, a collection of named properties. And I didn't
> mention that the properties had names. How careless of me.
Don't be silly. The term “collection” always had a very distinct and
special meaning with regard to browser APIs, pertaining to their interfaces
(e.g., HTMLCollection and HTMLOptionsCollection). The host object referred
to by the ”style” property is _not_ a collection.
<http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-75708506>
<http://www.w3.org/TR/DOM-Level-2-HTML/html.html#HTMLOptionsCollection>
<http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-ElementCSSInlineStyle>
<http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration>
<http://dev.w3.org/html5/spec/single-page.html#collections>
<http://dev.w3.org/html5/spec/single-page.html#the-style-attribute>
>> This has absolutely nothing to do with any script engine or the
>> programming language. The programming language – an ECMAScript
>> implementation – is just the interface language to the
>> language-independent DOM API here. (Almost needless to say that there is
>> no “Javascript engine” either, because there is no “Javascript”.)
>
> I'm sorry, you seem to be in the wrong newsgroup. Hereabouts we
> discuss Javascript. If you're looking for comp.lang.ecmascript-
> implementations, it's next door. And there's plenty of seating.
Like a true ignorant, you are attacking what you do not understand.
> The language-independent DOM API does not specify `someElement.style`,
> nor the collection of properties used to access and mutate it. That's
> part of Javascript. So as far as I can tell, the DOM API is entirely
> irrelevant.
No, it is very relevant. A DOM API is _not_ a part of the here-relevant
programming language (that has changed from JavaScript 1.3 to 1.4 because of
NES, but was never different with other ECMAScript implementations).
A script engine (such as SpiderMonkey, the script engine of Netscape/Mozilla
JavaScript) could not care less about properties that DOM objects provide
until those objects are accessed by program code. The W3C DOM API has an
ECMAScript language binding specified that allows its implementations to be
used with ECMAScript implementations, for example JavaScript. And a
browser's *layout engine* implements the interfaces of that Specification
as (ECMAScript) *host* objects according to the language binding of the
respective interfaces.
<http://www.w3.org/TR/DOM-Level-2-Core/ecma-script-binding.html>
<http://www.w3.org/TR/DOM-Level-3-Core/ecma-script-binding.html>
<http://www.w3.org/TR/DOM-Level-2-Style/ecma-script-binding.html>
aso.
> So let me amend my original statement:
[Fixed Google-borken quotation]
> | `someElement.style` represents the collection of named properties
> | known to the Javascript engine, which are the ones set by that engine,
> | unless you're living in the dark ages and still include <STYLE> tags on
> | your pages.
>
> Is that better?
No, you still have not the least bit of a shadow a clue what you are talking
about; sadly, that includes HTML (“<STYLE> tag”?). And if your postings in
this thread are examples of what the new FAQ is going to be, you should sure
hope that you find many knowledgable people to help correct your many
wannabe misconceptions, unless you want to have its readers unlearn even
more than if they had read one of the many bad books out there in the first
place.
PointedEars
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
baffled trying to call style.display value JeffG <jeffgutsell@fuse.net> - 2012-11-27 08:08 -0800
Re: baffled trying to call style.display value Scott Sauyet <scott.sauyet@gmail.com> - 2012-11-27 08:20 -0800
Re: baffled trying to call style.display value Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-12-10 01:24 +0100
Re: baffled trying to call style.display value Scott Sauyet <scott.sauyet@gmail.com> - 2012-12-10 05:03 -0800
Re: baffled trying to call style.display value Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-12-10 16:04 +0100
Re: baffled trying to call style.display value Scott Sauyet <scott.sauyet@gmail.com> - 2012-12-10 08:54 -0800
Re: baffled trying to call style.display value Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-12-10 19:36 +0100
Re: baffled trying to call style.display value Stefan Weiss <krewecherl@gmail.com> - 2012-12-10 22:45 +0100
Re: baffled trying to call style.display value Andrew Poulos <ap_prog@hotmail.com> - 2012-12-11 10:19 +1100
Re: baffled trying to call style.display value Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-12-11 00:34 +0100
Re: baffled trying to call style.display value Scott Sauyet <scott.sauyet@gmail.com> - 2012-12-10 07:39 -0800
Re: baffled trying to call style.display value Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-12-10 17:10 +0100
Re: baffled trying to call style.display value Jake Jarvis <pig_in_shoes@yahoo.com> - 2012-11-27 17:33 +0100
Re: baffled trying to call style.display value Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-11-27 17:49 +0100
Re: baffled trying to call style.display value JeffG <jeffgutsell@fuse.net> - 2012-11-27 09:38 -0800
Re: baffled trying to call style.display value Tim Streater <timstreater@greenbee.net> - 2012-11-27 17:59 +0000
Re: baffled trying to call style.display value Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-11-27 21:01 +0100
Re: baffled trying to call style.display value Tim Streater <timstreater@greenbee.net> - 2012-11-27 22:32 +0000
Re: baffled trying to call style.display value Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-11-27 23:50 +0100
csiph-web