- From: Robert O'Callahan <robert@ocallahan.org>
- Date: Wed, 18 Dec 2013 10:17:21 +1300
- To: Nick Williams <wicky@nillia.ms>
- Cc: www-style <www-style@w3.org>
- Message-ID: <CAOp6jLYsAB5AB2Z6o6g_dVN0Zq+h4Tz8uX_q+gnekk5t-t=h1Q@mail.gmail.com>
On Tue, Dec 17, 2013 at 10:49 AM, Nick Williams <wicky@nillia.ms> wrote: > Firstly, please excuse me if I’m breaking any etiquette. I have searched > through these archives looking for for previous discussion on this topic, > but found nothing. I can only assume I’m either in the wrong place or I’m > terrible at searching - please inform me if either is true :) > > I’m a developer and I have been working on a JavaScript-based slider with > fairly deep support. This could be supplanted almost entirely by the > css-snappoints spec, so I’m very interested in the progress of this > proposal. However I have not seen any discussion of the JS/DOM side of the > spec. As I asked above, firstly I’d like to know if there is already an > existing proposal for exposing some of this functionality in JS? > > To be able to *entirely* supplant the code I’m working on with features > from this spec there would need to be some extension points in JS, which > I’m sure we can agree are quite standard use-cases: > > 1. move slider position programmatically > * this would allow consumers to add pager-type controls and > next/previous buttons to their slider > 2. capture slide events > * I’m not sure on the fidelity of the events but at the very least > we’d need an event when moving from slide X to slide Y > * Possibly even events for the next slide being partially exposed > but not slid to > I'm not sure exactly what you mean by a "slide" here. You can read and write the scroll position using scrollLleft/scrollTop and the scroll event. In principle this is enough information to do whatever you need. Some convenience APIs might be useful, e.g. to compute the possible snapping destinations when scrolling in a particular direction. Rob -- Jtehsauts tshaei dS,o n" Wohfy Mdaon yhoaus eanuttehrotraiitny eovni le atrhtohu gthot sf oirng iyvoeu rs ihnesa.r"t sS?o Whhei csha iids teoa stiheer :p atroa lsyazye,d 'mYaonu,r "sGients uapr,e tfaokreg iyvoeunr, 'm aotr atnod sgaoy ,h o'mGee.t" uTph eann dt hwea lmka'n? gBoutt uIp waanndt wyeonut thoo mken.o w
Received on Tuesday, 17 December 2013 21:17:50 UTC