Question

I would like to be able to dynamically change the height of my popover window when I click on the toolbar item. The toolbar item and popover already work fine. The code is executed in the popovers javascript.

This page suggests that it can be done but they don't provide any examples: https://developer.apple.com/library/archive/documentation/Tools/Conceptual/SafariExtensionGuide/AddingPopovers/AddingPopovers.html

You can change the height and width properties of your popover at runtime.

Does anyone know how to achieve this?

Was it helpful?

Solution

E.g., from a script running in the popover:

safari.self.height = 400;

If you want to set the height from the global page:

safari.extension.popovers[0].width = 600;
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top