Elementals.js

Latest Version: 3.7 Final 20 December 2018

Method String.jsToCssName

Calling Convention:
String.jsToCssName()
Parameters:
None
Returns:
A string result where "camelCase" has been stripped, and hyphens added as appropriate to turn a JavaScript style property into its CSS equivalent. It also detects browser prefixes and prepends a hyphen when detected.

Example:

JavaScript
var jsName = "webkitBorderRadius";
console.log(jsName.jsToCssName());
Output
-webkit-border-radius

Elementals String Methods

Elementals Extensions

Polyfills

These link to the Mozilla Developer Network (MDN)

Property Key

  • Object
  • Method or Variable
  • "Constant" Variable

Downloads

Advertisement