W3C home > Mailing lists > Public > www-style@w3.org > August 2012

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

From: Garrett Smith <dhtmlkitchen@gmail.com>
Date: Tue, 28 Aug 2012 22:06:11 -0700
Message-ID: <CABZUbM3xd2j79CRRzar9ZZFLHeD2ZW5+6gN+UZxjp3gAU5YmCg@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, www-style list <www-style@w3.org>
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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:59 GMT