Re: [cssom] Remove setPropertyValue and setPropertyPriority?

On Thu, 02 Oct 2014 23:30:45 +0200, Peter Sloetjes <pjs.nl@live.com> wrote:

> On 02/10/2014 10:03, Simon Pieters wrote:>
>
>> Since setPropertyValue and setPropertyPriority were added as a  
>> compromise
>> solution when the behavior of setProperty was discussed last year[1],  
>> and
>> setProperty has now changed to match Firefox[2], should we remove
>> setPropertyValue and setPropertyPriority? I think they haven't been
>> implemented anywhere.
>
> The current resolution for setProperty is fine, but it does not make  
> "s.setPropertyValue(p,v)" less useful as a shorthand for  
> "s.setProperty(p,v,s.getPropertyPriority(p))".
> Adding the proposed functions makes the interface more symmetric, easier  
> to use and probably slightly faster in the relevant use cases.

Ah, yes, now I remember the original use case -- changing e.g. the color  
of everything without messing up !important. It's really only relevant for  
setPropertyValue, but it's still needed with the current setProperty  
semantic. Let's leave them in and see if browsers implement them as part  
of fixing setProperty. We can revisit this in a year or two.

cheers
-- 
Simon Pieters
Opera Software

Received on Thursday, 9 October 2014 08:44:05 UTC