[英]How can I simulate the back button on a samsung device using chrome?
I am using chrome devtools to debug a site running on an android device. 我正在使用chrome devtools调试在android设备上运行的网站。 In an android device you usually have the "menu" button and the "back" button. 在android设备中,您通常具有“菜单”按钮和“后退”按钮。 How can I emulate a key press to one of these keys using chrome devtools? 如何使用chrome devtools模拟这些按键之一的按键操作?
The action performed on pressing the "back" button is dependent on the context. 按下“后退”按钮时执行的操作取决于上下文。 It can be one of the two: 它可以是以下两者之一:
window.history.back()
您可以通过调用window.history.back()
来模拟它 window.close()
, but it only works in conjunction with window.open()
, so in order to use it the workflow would be: call window.open()
-> do stuff -> call window.close()
. 有window.close()
,但它只能与window.open()
结合使用,因此要使用它,工作流程为:调用window.open()
->做东西->调用window.close()
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.