Skip to content

ie-js: implement proper async setTimeout/setInterval with event loop #85

Description

@thomasnemer

Goal

setTimeout currently executes callbacks immediately (no delay). setInterval is a no-op stub. Need a proper event loop integration.

Current state

  • setTimeout fires callback synchronously during script execution
  • setInterval returns a dummy ID but never fires
  • No event loop — scripts run to completion then rendering happens

Implementation needed

  • Timer queue with scheduled callbacks
  • Integration with winit event loop (or separate JS tick)
  • Proper delay handling via tokio or std timers
  • clearTimeout/clearInterval actually cancel pending timers
  • requestAnimationFrame callback before each paint

Impact

Any site using setTimeout for deferred work or animations will behave incorrectly.

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