dropshado.ws

Front-end development minutiæ

by David DeSandro

Archive
RSS feed
Twitter
original Tumblr version

cssText

MDC > DOM Reference > cssRule.cssText:

cssText returns the actual text of the style rule.

Found in a fiddle by Divya Manian.

It’s used like element.style.cssText. From what I understand, it’s the equivalent of getting the string returned by element.getAttribute('style'). I haven’t found a use-case for it yet. element.style already returns a object.

View cssText fiddle

19 Apr 2011
  • js,
  • hasfiddle
Page of
  • desandro.com
  • @desandro
  • github.com/desandro
  • desandro’s JS Fiddles