简体   繁体   English

如何在UIWebview中检测DOM突变?

[英]How to detect DOM mutation in a UIWebview?

Is there a good way to detect changes made by a script to the DOM ? 有没有很好的方法来检测脚本对DOM所做的更改? Mutation observers don't seem to be available for Webkit on iOS. 突变观察者似乎不适用于iOS上的Webkit。

I think DOM mutation events are available in Mobile Safari but may not be forever since they are deprecated and replaced by mutation observers. 我认为DOM突变事件在Mobile Safari中可用,但可能不会永远存在,因为它们已过时并被突变观察者取代。 Therefore I'd suggest using mutation observers where possible and falling back to DOM mutation events. 因此,我建议在可能的情况下使用变异观察者,然后回溯到DOM变异事件。

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

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