From: David Mark on 28 Mar 2010 23:04 Garrett Smith wrote: > Michael Haufe ("TNO") wrote: >> On Mar 28, 4:44 pm, Eric Bednarz <bedn...(a)fahr-zur-hoelle.org> wrote: >>> David Mark <dmark.cins...(a)gmail.com> writes: >>>> Using class names for something other than intended indicates a bad >>>> design. >>> Class names have a general purpose role in HTML; I find it pretty hard >>> to think of a use case that isn�t covered by that. >> >> People are using class names for things they weren't meant to be used >> for. Ironically people are trying to shoehorn semantic meaning into >> HTML where it was already available in XHTML (go figure) > > The HTML class attribute is not meant to be limited for any particular > task. What is`class` being used for that it was not meant for? Asked and answered. See my other post.
From: Garrett Smith on 28 Mar 2010 23:55 David Mark wrote: > Garrett Smith wrote: >> Michael Haufe ("TNO") wrote: >>> On Mar 28, 4:44 pm, Eric Bednarz <bedn...(a)fahr-zur-hoelle.org> wrote: >>>> David Mark <dmark.cins...(a)gmail.com> writes: >>>>> Using class names for something other than intended indicates a bad >>>>> design. >>>> Class names have a general purpose role in HTML; I find it pretty hard >>>> to think of a use case that isn�t covered by that. >>> People are using class names for things they weren't meant to be used >>> for. Ironically people are trying to shoehorn semantic meaning into >>> HTML where it was already available in XHTML (go figure) >> The HTML class attribute is not meant to be limited for any particular >> task. What is`class` being used for that it was not meant for? > > Asked and answered. See my other post. Any answer coming from someone who exhibits such a strong aversion to reading specifications as you do is worthless. -- Garrett comp.lang.javascript FAQ: http://jibbering.com/faq/
From: Garrett Smith on 29 Mar 2010 00:04 Hans-Georg Michna wrote: > On Sat, 27 Mar 2010 07:19:24 -0700 (PDT), Michael Haufe ("TNO") > wrote: > >> On Mar 27, 7:18 am, Hans-Georg Michna <hans- >> georgNoEmailPle...(a)michna.com> wrote: > >>> How about performance? Can you afford to ignore querySelectAll, >>> if it is there, and use much slower JavaScript code? > >> What browser do you know of that has QSA that also has "slow" >> JavaScript in comparison? >> >> If the API is inconsistent across implementations then yes, and guess >> what, they are for complex queries. If you avoid complex queries then >> you aren't gaining much of an advantage using QSA over the other APIs >> already available. > > I see your point. > > That leaves the question, why are the browser makers > implementing something that nobody should use? (:-) > In this case, the browser vendors are implementing a W3C Candidate Recommendation, "Selectors API Level 1". The value in such API is that it provides a fast, native code alternative to hand-rolled query selector, providing an API. It is simpler than filtering the results from getElementsByTagName. -- Garrett comp.lang.javascript FAQ: http://jibbering.com/faq/
From: David Mark on 29 Mar 2010 00:53 Garrett Smith wrote: > David Mark wrote: >> Garrett Smith wrote: >>> Michael Haufe ("TNO") wrote: >>>> On Mar 28, 4:44 pm, Eric Bednarz <bedn...(a)fahr-zur-hoelle.org> wrote: >>>>> David Mark <dmark.cins...(a)gmail.com> writes: >>>>>> Using class names for something other than intended indicates a bad >>>>>> design. >>>>> Class names have a general purpose role in HTML; I find it pretty hard >>>>> to think of a use case that isn�t covered by that. >>>> People are using class names for things they weren't meant to be used >>>> for. Ironically people are trying to shoehorn semantic meaning into >>>> HTML where it was already available in XHTML (go figure) >>> The HTML class attribute is not meant to be limited for any particular >>> task. What is`class` being used for that it was not meant for? >> >> Asked and answered. See my other post. > Any answer coming from someone who exhibits such a strong aversion to > reading specifications as you do is worthless. You are clinging to that nonsense, aren't you? As I have said, reading specifications can only get you so far (and you are a prime example). I suppose in your simple-minded perception, that equates to a proposal to not read specifications at all. :)
From: Garrett Smith on 29 Mar 2010 03:11
David Mark wrote: > Garrett Smith wrote: >> David Mark wrote: >>> Garrett Smith wrote: >>>> Michael Haufe ("TNO") wrote: >>>>> On Mar 28, 4:44 pm, Eric Bednarz <bedn...(a)fahr-zur-hoelle.org> wrote: >>>>>> David Mark <dmark.cins...(a)gmail.com> writes: >>>>>>> Using class names for something other than intended indicates a bad >>>>>>> design. >>>>>> Class names have a general purpose role in HTML; I find it pretty hard >>>>>> to think of a use case that isn�t covered by that. >>>>> People are using class names for things they weren't meant to be used >>>>> for. Ironically people are trying to shoehorn semantic meaning into >>>>> HTML where it was already available in XHTML (go figure) >>>> The HTML class attribute is not meant to be limited for any particular >>>> task. What is`class` being used for that it was not meant for? >>> Asked and answered. See my other post. >> Any answer coming from someone who exhibits such a strong aversion to >> reading specifications as you do is worthless. > > You are clinging to that nonsense, aren't you? As I have said, reading > specifications can only get you so far (and you are a prime example). I > suppose in your simple-minded perception, that equates to a proposal to > not read specifications at all. :) Never have I avocated not reading the specifications; quite the opposite. For questions regarding the HTML `class` attribute, the pertinent specification is HTML 4.01. http://www.w3.org/TR/html401/struct/global.html#h-7.5.2 | 7.5.2 Element identifiers: the id and class attributes | | The class attribute, on the other hand, assigns one or more class | names to an element; the element may be said to belong to these | classes. A class name may be shared by several element instances. The | class attribute has several roles in HTML: | | * As a style sheet selector (when an author wishes to assign style | information to a set of elements). | * For general purpose processing by user agents. The section liberally states "the element may be said to belong to these classes". Not only does HTML 4 explicitly allow class to be used for reasons other than CSS, it is actually used for such ulterior purposes. Microformats, for example, utilize class attribute in HTML. I posted my reply to both comp.lang.javascript (original) and to the more relevant NG: comp.infosystems.www.authoring.html. -- Garrett comp.lang.javascript FAQ: http://jibbering.com/faq/ |