micro-app icon indicating copy to clipboard operation
micro-app copied to clipboard

document.write 方法没有被劫持

Open LinFeng1997 opened this issue 2 years ago • 2 comments

背景

描述您希望改进的问题。 在使用了一些第三方 JS 库的时候,它们会使用 document.write 方法,如:

document.write('<script async src="https://s9.cnzz.com/z_stat.php?id=xxx&web_id=yyy"></script>');

这个时候基座应用会被破坏。

期望的效果

劫持 document.write 方法,只改变子应用内部的 html。

LinFeng1997 avatar May 31 '22 07:05 LinFeng1997

要劫持这个的话,是不是应该顺便劫持一下document.close

jardenliu avatar Jun 10 '22 16:06 jardenliu

手动劫持,然后修改到对应的appName

Perseman avatar Jun 15 '22 02:06 Perseman