- From: Simon Pieters <simonp@opera.com>
- Date: Thu, 22 Aug 2013 10:52:30 +0200
- To: "www-style@w3.org" <www-style@w3.org>, François REMY <francois.remy.dev@outlook.com>
On Thu, 22 Aug 2013 00:04:46 +0200, François REMY
<francois.remy.dev@outlook.com> wrote:
> By the way, I found out there's no way to know which kind of
> CSSStyleDeclaration instance you're manipulating. While I believe
> superclasses would be nice, in the meantime it would be cool to have an
> isReadOnly property on the instances that enables you to know if you can
> write the style of it the properties are actually computed values.
What's the use case?
This can trivially be checked already, e.g. by using:
function isReadOnly(decl) {
try {
decl.setProperty('', '');
} catch(e) {
return true;
}
return false;
}
Is it common to check for this?
--
Simon Pieters
Opera Software
Received on Thursday, 22 August 2013 08:47:04 UTC