- From: Robert O'Callahan <robert@ocallahan.org>
- Date: Wed, 21 May 2008 10:58:23 +1200
On Wed, May 21, 2008 at 10:34 AM, Maciej Stachowiak <mjs at apple.com> wrote: > style.opacity = ... certainly triggers DOM API even if opacity was not > previously set on that style. > The property was always there, though, from the JS point of view. And there is even a plausible mapping for delete (style.removeProperty). > It's not completely open-ended but you can certainly have properties added > to and removed from a style declaration. > style.removeProperty does not remove the JS property, so from the JS point of view it's a misnomer. Ultimately the conclusion I question is that having obj.foo and obj.foo = > ... work, but not delete obj.foo, will create confusion or is somehow > illogical. I don't believe it will create confusion, and I think style is a > relevant example of a case where it has not. > FWIW, I see "style.opacity = '';" far more often than removeProperty. I don't think authors don't think of 'style' as a container to which they can add and remove arbitrary properties, so I continue to maintain it's not relevant to their expectations for storage. I don't care all that much. But since it's convenience with some use, and we've already implemented it and so has IE, I think we'd want a pretty strong argument to remove it. Rob -- "He was pierced for our transgressions, he was crushed for our iniquities; the punishment that brought us peace was upon him, and by his wounds we are healed. We all, like sheep, have gone astray, each of us has turned to his own way; and the LORD has laid on him the iniquity of us all." [Isaiah 53:5-6] -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20080521/da005d24/attachment.htm>
Received on Tuesday, 20 May 2008 15:58:23 UTC