Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!news2.arglkargh.de!news.mixmin.net!weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Thomas 'PointedEars' Lahn Newsgroups: comp.lang.javascript Subject: Re: DOM style object property names with vendor prefixes Date: Mon, 27 Oct 2014 22:20:22 +0100 Organization: PointedEars Software (PES) Lines: 46 Message-ID: <83210457.YLdJyC3XC5@PointedEars.de> References: Reply-To: Thomas 'PointedEars' Lahn Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit X-Trace: solani.org 1414444824 1474 eJwFwYEBwDAEBMCVSvgwTvD2H6F3fiDoa3CYr++GxUVFndTm9yblhrWy5s0EWY9EUohlav0uzxJq (27 Oct 2014 21:20:24 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Mon, 27 Oct 2014 21:20:24 +0000 (UTC) User-Agent: KNode/4.14.1 X-User-ID: eJwNxMEBwCAIA8CVJJKI4xQK+4/Q3uO4ZarjopzDATvfsarOCewyrO5bRDDX9tvizFOJfy4JyhtmCDvJ8OcDdXQVvw== Cancel-Lock: sha1:WF0Hu4UWvNXqPlESBnHV+AhTpIY= X-NNTP-Posting-Host: eJwFwYEBwEAEBLCVeBzGQdl/hCYmYIwrDGpn9942yBzrU/qFdIJa50jrzJOLhSOEeJNK5wcUNBCW Xref: csiph.com comp.lang.javascript:25994 Chris Beall wrote: > But, for bleeding-edge functions, it often becomes necessary to add > vendor-specific prefixes. But preferably not with client-side DOM scripting. In general, CSS properties should be specified in a stylesheet that is merely triggered with scripting, for example by toggling CSS class names on elements. Also be aware that you can generate and append those stylesheets with client-side DOM scripting, should it be necessary: > If there's a standard rule for that syntax, I haven't found it and would > appreciate a pointer or two. Example: '-moz-animation-duration' seems to > become 'MozAnimationDuration', but '-webkit-animation-duration' seems to > become 'webkitAnimationDuration', i.e. a different case pattern. You can also use the getPropertyValue(), removeProperty(), and setProperty() methods of the CSSStyleDeclaration interface, which take the original (hyphenated) CSS property names as arguments: > 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. Such as? > I would appreciate authoritative references. Since both are OSS: UTSL. You can also use the auto-completion built into the corresponding developer tools to find out. (also in the FAQ) -- PointedEars FAQ: | SVN: Twitter: @PointedEars2 | ES Matrix: Please do not Cc: me. / Bitte keine Kopien per E-Mail.