Path: csiph.com!usenet.pasdenom.info!news.albasani.net!news2.arglkargh.de!noris.net!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="UTF-8" Message-ID: <7546793.cFEfZxNJhn@PointedEars.de> From: Thomas 'PointedEars' Lahn Reply-To: Thomas 'PointedEars' Lahn Organization: PointedEars Software (PES) Date: Mon, 10 Dec 2012 16:04:38 +0100 User-Agent: KNode/4.4.11 Content-Transfer-Encoding: 8Bit X-Face: %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?s}.k+&. <1609195.3fhKV6gEnR@PointedEars.de> Followup-To: comp.lang.javascript MIME-Version: 1.0 Lines: 100 NNTP-Posting-Date: 10 Dec 2012 16:04:39 CET NNTP-Posting-Host: d8ebb5cb.newsspool3.arcor-online.net X-Trace: DXC=C^YWJoo8gFj<6cDJZfMd_cMcF=Q^Z^V3h4Fo<]lROoRa8kFK`nAS^n`T8dMf:F1FW[go^Ze X-Complaints-To: usenet-abuse@arcor.de Xref: csiph.com comp.lang.javascript:17654 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. >> 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. 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