Skip to content
This repository was archived by the owner on Jan 7, 2026. It is now read-only.
This repository was archived by the owner on Jan 7, 2026. It is now read-only.

feature: Async support / timers #220

@mdbenito

Description

@mdbenito

Maybe I'm misunderstanding how things are supposed to work, so I guess this is more of a question than a request:

Some (many?) methods exposed by the API are async in nature. E.g. navigating to a new page with context.openPage(). If one tries an action like zoomIntoView() right after openPage(), it will fail (although admittedly, attempting this is only possible if my PR is merged).

Solution?

An API returning promises for async operations.

Alternatives

Besides the obvious hack with setTimeout, one could use setInterval in the UI, or use more messages between it and the plugin, basically implementing the whole async behaviour inside the plugin.

But isn't this a very common pattern worth introducing into the library itself?

Additional context

I'm trying to navigate to shapes in other pages, hence my PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions