Skip to content

refactor: reduce global window.__frameScript coupling #14

@ubugeeei

Description

@ubugeeei

Finding

Several core APIs publish imperative hooks through window.__frameScript. This makes renderer automation convenient but spreads mutable global state across frame, image, audio waveform, and animation modules.

Evidence

  • src/lib/frame.tsx, src/lib/image.tsx, src/lib/audio-waveform.ts, and src/lib/animation.ts write to window.__frameScript.

Acceptance criteria

  • Define a typed FrameScript bridge interface in one module.
  • Centralize registration/cleanup behavior.
  • Preserve the current render automation API.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions