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

It doesn't look like there are any objections to this proposal from last
week. We're going to implement the solution described in bug 26294
<https://www.w3.org/Bugs/Public/show_bug.cgi?id=26294> unless we've got
other comments with a better idea.

Thanks,

--Jet


On Tue, Jul 22, 2014 at 5:39 PM, Kip Gilbert <kgilbert@mozilla.com> wrote:

> In the "Extensions to the Element Interface" section
> (http://www.w3.org/TR/cssom-view/#extensions-to-the-element-interface),
> the scrollTop and
> scrollLeft attributes have been extended:
>
>   attribute (double or ScrollOptionsVertical) scrollTop;
>   attribute (double or ScrollOptionsHorizontal) scrollLeft;
>
> The ScrollOptionsVertical and ScrollOptionsHorizontal dictionaries
> include the x and y position with the intent of setting the position
> and ScrollOptions simultaneously:
>
>   dictionary ScrollOptionsHorizontal : ScrollOptions {
>     double x;
>   };
>   dictionary ScrollOptionsVertical : ScrollOptions  {
>     double y;
>   };
>
> As the scrollLeft and scrollTop attributes are described in the CSSOM
> View specification as always returning double values while the setter
> functions receive either a double or dictionary value.  Setting an
> attribute with one datatype and returning a value with another data
> type is not allowed by the WebIDL specification.
>
> I have created a bug for this issue:
>
> https://www.w3.org/Bugs/Public/show_bug.cgi?id=26294
>
> 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.
>
> - Kearwood "Kip" Gilbert
>
>
>

Received on Tuesday, 29 July 2014 22:46:19 UTC