- From: Boris Zbarsky <bzbarsky@MIT.EDU>
- Date: Wed, 30 Jul 2014 22:48:21 -0400
- To: www-style@w3.org
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. > 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. -Boris
Received on Thursday, 31 July 2014 02:48:49 UTC