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

On 23/07/14 10:39, Kip Gilbert wrote:
> I would like to suggest that the scrollTop and scrollLeft attributes
> remain as double data type only, and that a separate method be added
> to the Element interface for scrolling with ScrollOptions:
>
>    void scrollTo(double x, double y, optional ScrollOptions options);
>
> Calling this method would be equivalent to setting both the scrollTop
> and scrollLeft attributes while simultanously specifying the
> ScrollOptions.

I think that's a much clearer API.  I don't think assigning an object 
with the scroll options but getting back out a double if you read it 
later is the kind of API we see elsewhere in the platform, or want to 
encourage.

Received on Wednesday, 30 July 2014 04:30:05 UTC