简体   繁体   English

有什么方法可以检测移动设备上跨网域iframe的点击?

[英]Any possible method to detect click on cross-domain iframe on mobile?

been a few weeks trying different ways to detect a cross-domain iframe click on mobile without success. 尝试使用多种方法来检测跨域iframe在移动设备上的点击已失败了数周。 I have tried all that has come through, all plugins, all forum tips, and yet i can't get a way to do it. 我已经尝试了所有实现的方法,所有插件,所有论坛技巧,但我没有办法做到这一点。 I coded whatever way i through will work and i got no positive results. 我编码了我可以通过的任何方式,但没有得到积极的结果。 Some plugins are working on newest phones like s6/7 (maybe for other older phones too?) using blur events but i need a reliable solution that will work with most to date phones. 一些插件正在使用模糊事件在最新的手机(如s6 / 7)上工作(也许也适用于其他较旧的手机?),但我需要一个可靠的解决方案,该解决方案可以与大多数最新手机一起使用。 Maybe there is a workaround with touchstart function for mobile.. I lost my chances into believing that there's a way to do it so today i am asking here maybe someone figured it out. 也许有一种针对移动设备的touchstart功能的解决方法。.我迷失了机会,以为有办法做到这一点,所以今天我在这里问也许有人想通了。 Thank you. 谢谢。

Ps this is a demo of a plugin called iframetracker. ps,这是一个名为iframetracker的插件的演示。 Can someone tell me if it works on old mobiles? 有人可以告诉我它是否可以在旧手机上使用吗? http://cdn.rawgit.com/vincepare/iframeTracker-jquery/master/demo/index.html http://cdn.rawgit.com/vincepare/iframeTracker-jquery/master/demo/index.html

The answer in short is No . 简而言之,答案是“ 否”

Regarding your plugin, on the github, it states very clearly: 关于您的插件,在github上,其声明非常清楚:

About mobile devices 关于移动设备

This plugin doesn't work on mobile devices such as smartphones and tablets, because this hardware uses a touchscreen instead of a mouse as click input. 该插件不适用于智能手机和平板电脑等移动设备,因为该硬件使用触摸屏而非鼠标作为单击输入。 This design makes the boundary monitoring trick useless 此设计使边界监视技巧无用

This is why you won't find a solution for your issue. 这就是为什么您找不到适合您问题的解决方案的原因。

There is no known work around for your particular problem with touch screen devices. 对于触摸屏设备的特定问题,尚无已知的解决方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM