Related #24, when transitions start, currently the transitions are initialized in-place, so there’s no way to retrieve the set tween after the transition starts. There’s some risky code when retrieving tweens that checks tween.name against the request name—but it’d be possible for the tween initializer to return a named function, and then have return the initialized value! For example:
Moreover, after a transition ends (or is interrupted or cancelled), the transition state is deleted from the DOM. Maybe it’s fine to say that transitions are destructive and just fix the above bug to return null, but would it be useful to be able to inspect the transition state after the transition ends? In order to do that, the transition object itself would need to retain the schedule for each node, rather than only storing it in the DOM. Which it could probably do as transition._schedules, or something.
Related #24, when transitions start, currently the transitions are initialized in-place, so there’s no way to retrieve the set tween after the transition starts. There’s some risky code when retrieving tweens that checks
tween.name
against the request name—but it’d be possible for the tween initializer to return a named function, and then have return the initialized value! For example:So, oops!
Moreover, after a transition ends (or is interrupted or cancelled), the transition state is deleted from the DOM. Maybe it’s fine to say that transitions are destructive and just fix the above bug to return null, but would it be useful to be able to inspect the transition state after the transition ends? In order to do that, the transition object itself would need to retain the schedule for each node, rather than only storing it in the DOM. Which it could probably do as transition._schedules, or something.