Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set popover height

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?

like image 840
thefoyer Avatar asked May 27 '26 07:05

thefoyer


1 Answers

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;
like image 131
chulster Avatar answered May 30 '26 05:05

chulster



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!