W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2012

Re: Element.style setter

From: François REMY <fremycompany_pub@yahoo.fr>
Date: Mon, 27 Aug 2012 13:13:48 +0200
Message-ID: <197F8BA0CFA8426EB5C91F268CC0AC85@FREMYD2>
To: <www-dom@w3.org>, João Eiras <joaoe@opera.com>
See element.style.cssText 

-----Message d'origine----- 
From: João Eiras
Sent: Monday, August 27, 2012 11:41 AM
To: www-dom@w3.org
Subject: Element.style setter

Hi !

Opera allows element.style to be set with a css fragment, like

# element.style = 'background:green'

which maps to

# element.setAttribute('style', 'background:green');

Others do not support this (throw an error due to being a read-only
property), but it makes the code less verbose.

How about allowing this in DOM 4 ?

Received on Monday, 27 August 2012 11:14:09 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:19 UTC