Skip to content

no transitionstart/animationstart events #802

Description

@XDLCS

Steps to reproduce

Serve this page, then toggle the class via JS/CDP after load:

<!DOCTYPE html>
<html>
<head><style>
  #anim { width: 50px; height: 50px; background: red; transition: width 0.1s; }
  #anim.wide { width: 200px; }
  @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(90deg); } }
  #kf { width: 20px; height: 20px; background: blue; animation: spin 0.2s 1; }
</style></head>
<body>
  <div id="anim"></div>
  <div id="kf"></div>
  <pre id="log"></pre>
  <script>
    const log = [];
    ['transitionrun','transitionstart','transitionend','transitioncancel']
      .forEach(t => document.getElementById('anim').addEventListener(t, e => log.push(t)));
    ['animationstart','animationiteration','animationend','animationcancel']
      .forEach(t => document.getElementById('kf').addEventListener(t, () => log.push(t)));
    window.__events = log;
  </script>
</body>
</html>

Run document.getElementById('anim').className = 'wide' after load, then read window.__events.

Expected (Chrome 154)

The full sequences fire:

transitionrun:"width", transitionstart:"width", transitionend:"width"
animationstart, animationend

Actual (moli 1.1.10, 9b2f86b)

Zero transition/animation events fire — on both the class-toggle path and initial-load animations.

Analysis

The animations themselves run: computed width interpolates and animationName resolves. Only the events are missing. The animation scan appears to enqueue only at addEventListener("animationstart") registration time (window_host.rs:339 in 1.1.9 sources); style/class changes that start new animations have no rescan entry, though the rendering-updates queue mechanism exists.

Suggestion

Queue an animation-start scan on style invalidation in the rendering-updates queue.

Environment

  • moli 1.1.10 (9b2f86b), Linux
  • CDP probe vs Chrome 154.0.8037.57, same fixture and probe on both engines

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions