我在浏览器框中触发事件,但每次导航 URL 时,我的浏览器级别缩放都会重置。
像 chrome 中的浏览器级别缩放是通过“{ctrl} + {鼠标滚轮}”或“{Ctr}l + {+}”控制的
我可以设置任何参数来控制它或保持用户以前的设置吗?
每次都达到 100% 并不理想。
我也可以完全控制网页,但我不想做 CSS 解决方案,我有我使用浏览器级别缩放的理由。 我有不同的使用 CSS 的缩放功能。
Chromedriver 和 selenium 是我正在使用的另一个选项,但 chromedriver 需要我想摆脱的外部挂钩。
但是,它没有这个问题,浏览器的实例保留缩放级别,直到用户修改
Try(
wb << navigate (url);
,
Throw(
w = New Window( "JMP_Driver", wb = Web Browser Box());
w << Set window size (1200,1200);
//wb << set auto stretching (1,1);
//w << set auto stretching (1,1);
wb << navigate (url);
)
);
I find the Web Browser Box() super helpful! Edge (based on chromium) has such a better display engine than JMP, so for complicated forms and UI elements, implementing them in the web as a SPA is preferable. The hard part was to have JMP + SPA instance communicate reliably, but that was just tedious rather than difficult. I'm curious as to what you're wanting with your embedded web app -- if it's your own web-app, then maybe you can set it up to not do reloads, and then it'll keep it's zoom-level.