- From: Brian Birtles via GitHub <sysbot+gh@w3.org>
- Date: Tue, 05 Dec 2017 04:43:16 +0000
- To: public-css-archive@w3.org
_From @Martin-Pitt on August 11, 2016 12:26_ Do agree that in terms of flexibility/compat passing an options object makes more sense. However still think we can go a level lower by not having the element as it is still implying a dependency with the DOM. I noticed that computed timing options have a `progress` which is equivalent to the fraction from onsample, so this object does make a lot more sense and gives all the info needed. Perhaps this then? ```javascript const effectOptions = { onsample(timing) { let fraction = timing.progress; } }; const timingOptions = { duration: 1250, easing: 'ease-in' }; const effect = new WebEffect(effectOptions, timingOptions); const animation = new Animation(effect, document.timeline); animation.play(); ``` -- GitHub Notification of comment by birtles Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2062#issuecomment-349193910 using your GitHub account
Received on Tuesday, 5 December 2017 04:43:44 UTC