Skip to content

Why should pass window object for calling it's methods? #33

@the-dr-lazy

Description

@the-dr-lazy

I'm just curious about the pattern used in this standard library API for interacting with JavaScript window object methods.
Why should pass window object every time calling an effectful function like requestAnimationFrame?

requestAnimationFrame :: Window -> Effect Unit -> Effect RequestAnimationFrameId

-- Why not this?
requestAnimationFrame :: Effect Unit -> Effect RequestAnimationFrameId

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