Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #25991 > unrolled thread
| Started by | "Chris Beall" <Chris_Beall@prodigy.net> |
|---|---|
| First post | 2014-10-27 16:30 -0400 |
| Last post | 2014-10-30 10:47 -0400 |
| Articles | 12 on this page of 32 — 8 participants |
Back to article view | Back to comp.lang.javascript
DOM style object property names with vendor prefixes "Chris Beall" <Chris_Beall@prodigy.net> - 2014-10-27 16:30 -0400
Re: DOM style object property names with vendor prefixes "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2014-10-27 14:07 -0700
Re: DOM style object property names with vendor prefixes "Chris Beall" <Chris_Beall@prodigy.net> - 2014-10-27 17:43 -0400
Re: DOM style object property names with vendor prefixes Andrew Poulos <ap_prog@hotmail.com> - 2014-10-28 09:48 +1100
Re: DOM style object property names with vendor prefixes "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2014-10-27 22:45 -0700
Re: DOM style object property names with vendor prefixes Andrew Poulos <ap_prog@hotmail.com> - 2014-10-28 19:31 +1100
Re: DOM style object property names with vendor prefixes "Chris Beall" <Chris_Beall@prodigy.net> - 2014-10-28 09:59 -0400
Re: DOM style object property names with vendor prefixes Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-10-28 15:26 +0100
Re: DOM style object property names with vendor prefixes Andrew Poulos <ap_prog@hotmail.com> - 2014-10-31 12:29 +1100
Re: DOM style object property names with vendor prefixes Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-10-27 22:20 +0100
Re: DOM style object property names with vendor prefixes "Chris Beall" <Chris_Beall@prodigy.net> - 2014-10-27 18:11 -0400
Re: DOM style object property names with vendor prefixes Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-10-27 23:45 +0100
Re: DOM style object property names with vendor prefixes "Chris Beall" <Chris_Beall@prodigy.net> - 2014-10-27 20:38 -0400
Re: DOM style object property names with vendor prefixes Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-10-28 19:49 +0100
Re: DOM style object property names with vendor prefixes "Chris Beall" <Chris_Beall@prodigy.net> - 2014-10-28 17:56 -0400
Re: DOM style object property names with vendor prefixes Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-10-29 21:07 +0100
Re: DOM style object property names with vendor prefixes "Chris Beall" <Chris_Beall@prodigy.net> - 2014-10-30 12:50 -0400
Re: DOM style object property names with vendor prefixes Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-10-30 19:13 +0100
Re: DOM style object property names with vendor prefixes "Chris Beall" <Chris_Beall@prodigy.net> - 2014-10-30 17:17 -0400
Re: DOM style object property names with vendor prefixes Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-10-31 20:35 +0100
Re: DOM style object property names with vendor prefixes "Chris Beall" <Chris_Beall@prodigy.net> - 2014-10-27 23:19 -0400
Re: DOM style object property names with vendor prefixes John Harris <niam@jghnorth.org.uk.invalid> - 2014-10-28 10:11 +0000
Re: DOM style object property names with vendor prefixes Tim Streater <timstreater@greenbee.net> - 2014-10-28 11:42 +0000
Re: DOM style object property names with vendor prefixes "Chris Beall" <Chris_Beall@prodigy.net> - 2014-10-28 09:52 -0400
Re: DOM style object property names with vendor prefixes "Chris Beall" <Chris_Beall@prodigy.net> - 2014-10-28 09:49 -0400
Re: DOM style object property names with vendor prefixes John Harris <niam@jghnorth.org.uk.invalid> - 2014-10-29 15:48 +0000
Re: DOM style object property names with vendor prefixes Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-10-28 15:54 +0100
Re: DOM style object property names with vendor prefixes Scott Sauyet <scott.sauyet@gmail.com> - 2014-10-30 08:12 -0700
Re: DOM style object property names with vendor prefixes Joao Rodrigues <groups_jr-1@yahoo.com.br> - 2014-10-29 15:23 -0200
Re: DOM style object property names with vendor prefixes Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-10-29 21:47 +0100
Re: DOM style object property names with vendor prefixes Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-10-30 07:32 +0100
Re: DOM style object property names with vendor prefixes "Chris Beall" <Chris_Beall@prodigy.net> - 2014-10-30 10:47 -0400
Page 2 of 2 — ← Prev page 1 [2]
| From | "Chris Beall" <Chris_Beall@prodigy.net> |
|---|---|
| Date | 2014-10-27 23:19 -0400 |
| Message-ID | <op.xoe7iw12tnmj2w@cbealls-imac.local> |
| In reply to | #25997 |
Thomas 'PointedEars' Lahn wrote: > Chris Beall wrote: > >> On Mon, 27 Oct 2014 17:20:22 -0400, Thomas 'PointedEars' Lahn >> <PointedEars@web.de> wrote: > > Please do not post attribution novels. I have adjusted this in the Opera accounts.ini file on the Followup= line, which I eventually found (on OS X 10.8.5) at Users/MyUserName/Library/Application Support/Opera/mail/ and using the parameters documented at http://www.opera.com/help/tutorials/mail/advanced/#imap What could be more obvious... Chris Beall
[toc] | [prev] | [next] | [standalone]
| From | John Harris <niam@jghnorth.org.uk.invalid> |
|---|---|
| Date | 2014-10-28 10:11 +0000 |
| Message-ID | <hsqu4a1of3ondtju34fulgb60dvpv6pumg@4ax.com> |
| In reply to | #26000 |
On Mon, 27 Oct 2014 23:19:34 -0400, "Chris Beall" <Chris_Beall@prodigy.net> wrote: >Thomas 'PointedEars' Lahn wrote: > >> Chris Beall wrote: >> >>> On Mon, 27 Oct 2014 17:20:22 -0400, Thomas 'PointedEars' Lahn >>> <PointedEars@web.de> wrote: >> >> Please do not post attribution novels. > >I have adjusted this in the Opera accounts.ini file on the Followup= line, >which I eventually found (on OS X 10.8.5) at >Users/MyUserName/Library/Application Support/Opera/mail/ and using the >parameters documented at >http://www.opera.com/help/tutorials/mail/advanced/#imap > >What could be more obvious... Now convince yourself that you will *never* want to post a quote in another thread. Because if you do your "Thingy wrote:" line won't convince anyone that you haven't invented the quote yourself. John
[toc] | [prev] | [next] | [standalone]
| From | Tim Streater <timstreater@greenbee.net> |
|---|---|
| Date | 2014-10-28 11:42 +0000 |
| Message-ID | <281020141142486925%timstreater@greenbee.net> |
| In reply to | #26005 |
In article <hsqu4a1of3ondtju34fulgb60dvpv6pumg@4ax.com>, John Harris <niam@jghnorth.org.uk.invalid> wrote: > On Mon, 27 Oct 2014 23:19:34 -0400, "Chris Beall" > <Chris_Beall@prodigy.net> wrote: > > >Thomas 'PointedEars' Lahn wrote: > > > >> Chris Beall wrote: > >> > >>> On Mon, 27 Oct 2014 17:20:22 -0400, Thomas 'PointedEars' Lahn > >>> <PointedEars@web.de> wrote: > >> > >> Please do not post attribution novels. > > > >I have adjusted this in the Opera accounts.ini file on the Followup= line, > >which I eventually found (on OS X 10.8.5) at > >Users/MyUserName/Library/Application Support/Opera/mail/ and using the > >parameters documented at > >http://www.opera.com/help/tutorials/mail/advanced/#imap > > > >What could be more obvious... > > Now convince yourself that you will *never* want to post a quote in > another thread. > > Because if you do your "Thingy wrote:" line won't convince anyone that > you haven't invented the quote yourself. And folks should take note that PointyHead does not own this ng, however much he thinks he does. So use whatever form of attribution you feel like. -- "People don't buy Microsoft for quality, they buy it for compatibility with what Bob in accounting bought last year. Trace it back - they buy Microsoft because the IBM Selectric didn't suck much" - P Seebach, afc
[toc] | [prev] | [next] | [standalone]
| From | "Chris Beall" <Chris_Beall@prodigy.net> |
|---|---|
| Date | 2014-10-28 09:52 -0400 |
| Message-ID | <op.xof0tlmptnmj2w@cbealls-imac.local> |
| In reply to | #26006 |
Tim Streater wrote: > In article <hsqu4a1of3ondtju34fulgb60dvpv6pumg@4ax.com>, John Harris > <niam@jghnorth.org.uk.invalid> wrote: > >> On Mon, 27 Oct 2014 23:19:34 -0400, "Chris Beall" >> <Chris_Beall@prodigy.net> wrote: >> >Thomas 'PointedEars' Lahn wrote: >> > >> >> Chris Beall wrote: >> >> >> >>> On Mon, 27 Oct 2014 17:20:22 -0400, Thomas 'PointedEars' Lahn >> >>> <PointedEars@web.de> wrote: >> >> >> >> Please do not post attribution novels. >> > (snip) >> Now convince yourself that you will *never* want to post a quote in >> another thread. >> Because if you do your "Thingy wrote:" line won't convince anyone that >> you haven't invented the quote yourself. > > And folks should take note that PointyHead does not own this ng, > however much he thinks he does. So use whatever form of attribution you > feel like. > I knew that, but I felt that Thomas had a valid point, in spite of the way in which he made it. Chris Beall
[toc] | [prev] | [next] | [standalone]
| From | "Chris Beall" <Chris_Beall@prodigy.net> |
|---|---|
| Date | 2014-10-28 09:49 -0400 |
| Message-ID | <op.xof0ojhjtnmj2w@cbealls-imac.local> |
| In reply to | #26005 |
John Harris wrote: > On Mon, 27 Oct 2014 23:19:34 -0400, "Chris Beall" > <Chris_Beall@prodigy.net> wrote: > >> Thomas 'PointedEars' Lahn wrote: >> >>> Chris Beall wrote: >>> >>>> On Mon, 27 Oct 2014 17:20:22 -0400, Thomas 'PointedEars' Lahn >>>> <PointedEars@web.de> wrote: >>> >>> Please do not post attribution novels. >> >> I have adjusted this in the Opera accounts.ini file on the Followup= >> line, >> which I eventually found (on OS X 10.8.5) at >> Users/MyUserName/Library/Application Support/Opera/mail/ and using the >> parameters documented at >> http://www.opera.com/help/tutorials/mail/advanced/#imap >> >> What could be more obvious... > > Now convince yourself that you will *never* want to post a quote in > another thread. > > Because if you do your "Thingy wrote:" line won't convince anyone that > you haven't invented the quote yourself. > > John I would hope that including a date, timestamp, and email address wouldn't convince anyone otherwise, as they are just as easily invented. In any case, I have no intention of inventing quotes, and I'm not sure I want to deal with anyone who things I would. Chris Beall
[toc] | [prev] | [next] | [standalone]
| From | John Harris <niam@jghnorth.org.uk.invalid> |
|---|---|
| Date | 2014-10-29 15:48 +0000 |
| Message-ID | <i0325atd6dauqfnhl00f94lepdqp66use2@4ax.com> |
| In reply to | #26008 |
On Tue, 28 Oct 2014 09:49:21 -0400, "Chris Beall" <Chris_Beall@prodigy.net> wrote: >John Harris wrote: > >> On Mon, 27 Oct 2014 23:19:34 -0400, "Chris Beall" >> <Chris_Beall@prodigy.net> wrote: >> >>> Thomas 'PointedEars' Lahn wrote: >>> >>>> Chris Beall wrote: >>>> >>>>> On Mon, 27 Oct 2014 17:20:22 -0400, Thomas 'PointedEars' Lahn >>>>> <PointedEars@web.de> wrote: >>>> >>>> Please do not post attribution novels. >>> >>> I have adjusted this in the Opera accounts.ini file on the Followup= >>> line, >>> which I eventually found (on OS X 10.8.5) at >>> Users/MyUserName/Library/Application Support/Opera/mail/ and using the >>> parameters documented at >>> http://www.opera.com/help/tutorials/mail/advanced/#imap >>> >>> What could be more obvious... >> >> Now convince yourself that you will *never* want to post a quote in >> another thread. >> >> Because if you do your "Thingy wrote:" line won't convince anyone that >> you haven't invented the quote yourself. >> >> John > >I would hope that including a date, timestamp, and email address wouldn't >convince anyone otherwise, as they are just as easily invented. >In any case, I have no intention of inventing quotes, and I'm not sure I >want to deal with anyone who things I would. You haven't understood. The paper Thomas keeps pointing to says that the unique Message-ID can be found in the article's headers. Well, here's a case where it clearly can't. This destroys the entire argument of the paper. If, however, the you include information that will allow you to do a newsgroup search then you can look at the original article to see if it's being quoted in context and accurately. John
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2014-10-28 15:54 +0100 |
| Message-ID | <18619837.6gmPrtHHcH@PointedEars.de> |
| In reply to | #26000 |
Chris Beall wrote: > Thomas 'PointedEars' Lahn wrote: >> Chris Beall wrote: >>> On Mon, 27 Oct 2014 17:20:22 -0400, Thomas 'PointedEars' Lahn >>> <PointedEars@web.de> wrote: >> >> Please do not post attribution novels. > > I have adjusted this in the Opera accounts.ini file on the Followup= line, > which I eventually found (on OS X 10.8.5) at > Users/MyUserName/Library/Application Support/Opera/mail/ and using the > parameters documented at > http://www.opera.com/help/tutorials/mail/advanced/#imap > > What could be more obvious... Thank you for the modification and for sharing the how-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 | Scott Sauyet <scott.sauyet@gmail.com> |
|---|---|
| Date | 2014-10-30 08:12 -0700 |
| Message-ID | <a8f8ed2b-2d5b-4ea1-8f90-faf2e13ceee7@googlegroups.com> |
| In reply to | #25997 |
Thomas 'PointedEars' Lahn wrote: > Chris Beall wrote: >> Could you elaborate? > > (Do not ask a Yes-or-No question unless you want either Yes or No for an > answer.) Do not answer Yes-or-No questions with anything other than a Yes or a No unless you want to invite further Yes-or-No questions. -- Scott
[toc] | [prev] | [next] | [standalone]
| From | Joao Rodrigues <groups_jr-1@yahoo.com.br> |
|---|---|
| Date | 2014-10-29 15:23 -0200 |
| Message-ID | <m2r7q5$otd$1@speranza.aioe.org> |
| In reply to | #25991 |
On 27/10/2014 18:30, Chris Beall wrote:
> I occasionally use JavaScript to dynamically modify style sheets. This
> requires that I know the DOM equivalent of CSS property names. For
> example: CSS property name 'animation-duration' becomes DOM name
> 'animationDuration'. The general conversion formula seems to be: remove
> hyphens and capitalize the next letter (camel case).
>
> But, for bleeding-edge functions, it often becomes necessary to add
> vendor-specific prefixes. If there's a standard rule for that syntax, I
> haven't found it and would appreciate a pointer or two.
There's a W3C Recommendation for the CSS 2.1 Specification, section
4.1.2.1 Vendor-specific extensions:
<http://www.w3.org/TR/CSS21/syndata.html#vendor-keywords>
> Example:
> '-moz-animation-duration' seems to become 'MozAnimationDuration', but
> '-webkit-animation-duration' seems to become 'webkitAnimationDuration',
> i.e. a different case pattern. When I say 'seems to become' I am
> referring to the results of experimentation on my part, which may be
> erroneous and which is complicated by the fact that some browsers don't
> seem to support modification of vendor-specific values at all.
>
> I would appreciate authoritative references.
There are some tools that help dealing with the "Vendor-specific
extensions", as described in this article:
<http://css-tricks.com/how-to-deal-with-vendor-prefixes/>
Sometimes, I simply open the console in the target browser and try to
retrieve the attributes of a given element (the one who has
vendor-specific prefixes), e.g.
var el = document.getElementById('someID');
var atts = el.attributes;
[].slice.call(atts).forEach(function(item) {
console.log(item.name + ': ' + item.value)
});
And sometimes I create a dummy div and retrieve its style, e.g.
var parseEl = document.createElement('div');
var css = parseEl.style;
for (i in css) {
if (/moz|webkit/i.test(i)) console.log(i + ': ' + css[i])
}
--
Joao Rodrigues
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2014-10-29 21:47 +0100 |
| Message-ID | <10973897.6iAA0hNIMK@PointedEars.de> |
| In reply to | #26027 |
Joao Rodrigues wrote:
> On 27/10/2014 18:30, Chris Beall wrote:
>> [?] CSS property name 'animation-duration' becomes DOM name
>> 'animationDuration'. The general conversion formula seems to be:
>> remove hyphens and capitalize the next letter (camel case).
>>
>> But, for bleeding-edge functions, it often becomes necessary to add
>> vendor-specific prefixes. If there's a standard rule for that syntax, I
>> haven't found it and would appreciate a pointer or two.
>
> There's a W3C Recommendation for the CSS 2.1 Specification, section
> 4.1.2.1 Vendor-specific extensions:
> <http://www.w3.org/TR/CSS21/syndata.html#vendor-keywords>
You are missing the point. The question was about if there are any formal
specifications as to how style property names translate to style *object*
property names.
There are not; there are only de-facto standards (which Mozilla *appears*
not to care to follow for some reason).
>> I would appreciate authoritative references.
>
> There are some tools that help dealing with the "Vendor-specific
> extensions", as described in this article:
> <http://css-tricks.com/how-to-deal-with-vendor-prefixes/>
There is nothing authoritative about this site, so it fails to meet the
request.
I strongly recommend to avoid all the approaches mentioned there except CSS
preprocessors like LESS and SASS (use them server-side if possible).
> Sometimes, I simply open the console in the target browser and try to
> retrieve the attributes of a given element (the one who has
> vendor-specific prefixes), e.g.
>
> var el = document.getElementById('someID');
> var atts = el.attributes;
> [].slice.call(atts).forEach(function(item) {
> console.log(item.name + ': ' + item.value)
> });
I am not sure if this is a good idea at all.
> And sometimes I create a dummy div and retrieve its style, e.g.
>
> var parseEl = document.createElement('div');
> var css = parseEl.style;
> for (i in css) {
(Unguarded) for-in iteration over host objects certainly is a Very Bad Idea,
as you have been told before.
> if (/moz|webkit/i.test(i)) console.log(i + ': ' + css[i])
> }
Should be at least /^(moz|webkit)/i.
--
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 | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2014-10-30 07:32 +0100 |
| Message-ID | <4739163.5him419PJc@PointedEars.de> |
| In reply to | #26030 |
Thomas 'PointedEars' Lahn wrote: > Joao Rodrigues wrote: >> On 27/10/2014 18:30, Chris Beall wrote: >>> […] CSS property name 'animation-duration' becomes DOM name >>> 'animationDuration'. The general conversion formula seems to be: >>> remove hyphens and capitalize the next letter (camel case). >>> >>> But, for bleeding-edge functions, it often becomes necessary to add >>> vendor-specific prefixes. If there's a standard rule for that syntax, I >>> haven't found it and would appreciate a pointer or two. >> >> There's a W3C Recommendation for the CSS 2.1 Specification, section >> 4.1.2.1 Vendor-specific extensions: >> <http://www.w3.org/TR/CSS21/syndata.html#vendor-keywords> > > You are missing the point. The question was about if there are any formal > specifications as to how style property names translate to style *object* > property names. > > There are not; there are only de-facto standards (which Mozilla *appears* > not to care to follow for some reason). Make that _WebKit_. -- 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 | "Chris Beall" <Chris_Beall@prodigy.net> |
|---|---|
| Date | 2014-10-30 10:47 -0400 |
| Message-ID | <op.xojso0entnmj2w@cbealls-imac.local> |
| In reply to | #26027 |
Joao Rodrigues wrote: > On 27/10/2014 18:30, Chris Beall wrote: >> I occasionally use JavaScript to dynamically modify style sheets. This >> requires that I know the DOM equivalent of CSS property names. For >> example: CSS property name 'animation-duration' becomes DOM name >> 'animationDuration'. The general conversion formula seems to be: remove >> hyphens and capitalize the next letter (camel case). >> >> But, for bleeding-edge functions, it often becomes necessary to add >> vendor-specific prefixes. If there's a standard rule for that syntax, I >> haven't found it and would appreciate a pointer or two. > > There's a W3C Recommendation for the CSS 2.1 Specification, section > 4.1.2.1 Vendor-specific extensions: > <http://www.w3.org/TR/CSS21/syndata.html#vendor-keywords> Good information, but addresses CSS syntax, not DOM syntax. So, in CSS, "All CSS syntax is case-insensitive within the ASCII range (i.e., [a-z] and [A-Z] are equivalent), except for parts that are not under the control of CSS." and, for vendor prefixes, "Keywords and property names beginning with -' or '_' are reserved for vendor-specific extensions.", which, as a later table in the same reference shows, doesn't mean vendors will always use the syntax reserved for them. In the DOM objects representing CSS properties, however, different conventions (perhaps they are rules, but the authoritative reference has been elusive thus far). The convention seem to be (whether vendor-specific prefixes are being used or not): 1. lowercase the property name, 2, uppercase each letter that follows a dash, 3. remove all dashes. Thus W3C 'official' property names (which never start with a dash) will always be camel-cased in the DOM, while vendor-specific ones will always have an uppercase letter at, and only at, the beginning of each word, ex: border-top becomes borderTop, -moz-animation-duration becomes MozAnimationDuration. The DOM representation IS case sensitive, so doing the conversion correctly is important if you are modifying the DOM. All of the above was determined by experiment. Since experiments seldom cover all possibilities, I would appreciate hearing about contrary experimental results. (snip) >> I would appreciate authoritative references. > > There are some tools that help dealing with the "Vendor-specific > extensions", as described in this article: > <http://css-tricks.com/how-to-deal-with-vendor-prefixes/> If I were doing commercial work, I might seek out such tools, but I prefer hand coding, which helps me understand what I did if I have to go back later to make a change. It's harder for me to stay current with multiple tools than with a few basic specifications. Just a personal preference. Chris Beall
[toc] | [prev] | [standalone]
Page 2 of 2 — ← Prev page 1 [2]
Back to top | Article view | comp.lang.javascript
csiph-web