W3C home > Mailing lists > Public > www-style@w3.org > July 2014

Re: [CSSOM View] Extensions to Element.scrollLeft and Element.scrollTop are not valid WebIDL

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 30 Jul 2014 22:07:45 -0500
Message-ID: <CAAWBYDDDRs5=e8Eazp3bpfm-AdiX-u=WAGQUx6T3_UWaNFQjLA@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: www-style list <www-style@w3.org>
On Wed, Jul 30, 2014 at 9:48 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> On 7/30/14, 5:45 PM, Tab Atkins Jr. wrote:
>> I don't think this signature is quite right.  It requires you to set
>> both x and y, while setting the attributes lets you do only one or the
>> other if you want.
> Note that the signature could just make x and y optional, but that still
> means needing to pass undefined when you want to not scroll in the
> corresponding direction.

Right, that's clumsy even if all we were concerned about is
reproducing left/top scrolling.

>> I'd prefer subclassing ScrollOptions into containing top/left members,
>> and having scrollTo just take a ScrollOptions object.  Give top/left a
>> default of null
> Why?  Just have missing values mean "no scrolling"; no need for null.

Oh, duh, brain fart. I temporarily forgot that dict members could just
have no value, because attributes can't.

Received on Thursday, 31 July 2014 03:08:32 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:51:35 UTC