- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Wed, 30 Jul 2014 22:07:45 -0500
- 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. ~TJ
Received on Thursday, 31 July 2014 03:08:32 UTC