_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/2063#issuecomment-349194071 using your GitHub accountReceived on Tuesday, 5 December 2017 04:44:44 UTC
This archive was generated by hypermail 2.4.0 : Thursday, 24 March 2022 20:26:44 UTC