Re: [CSSOM] Behavior of setting .style.foo to null

On 8/28/12, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> On 8/28/12 5:57 PM, Garrett Smith wrote:
>> Boris said what happens in two different cases. No declaration is
>> removed.
>
> Oh, a declaration is removed in one of those cases, all right.  Setting
> .style.foo to "" is equivalent to calling removeProperty().
>
That method is useless and not worth remembering. Good thing
removeProperty method does not actually remove a property, either,
because otherwise, you'd end up with typeof style.color ==
"undefined".
-- 
Garrett
Twitter: @xkit
personx.tumblr.com

Received on Wednesday, 29 August 2012 05:06:43 UTC