我希望能够在单击工具栏项时动态更改弹出窗口的高度.工具栏项和弹出窗口已经正常工作.代码在popovers javascript中执行.
此页面表明它可以完成,但它们不提供任何示例:http: //developer.apple.com/library/safari/#documentation/Tools/Conceptual/SafariExtensionGuide/AddingPopovers/AddingPopovers.html
You can change the height and width properties of your popover at runtime.
Run Code Online (Sandbox Code Playgroud)
有谁知道如何实现这一目标?
例如,从popover中运行的脚本:
safari.self.height = 400;
Run Code Online (Sandbox Code Playgroud)
如果要从全局页面设置高度:
safari.extension.popovers[0].width = 600;
Run Code Online (Sandbox Code Playgroud)