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.