在我的项目中,我应该识别可以通过 document.write 在脚本中完成的动态创建的标签。我为 document.write 创建了一个钩子,但它没有检索所有 document.write 函数。我的代码如下
更新:
var oldDocumentWrite = document.write;
document.write = function (text)
{
console.log(text);
}
其中 text 是 document.write 的参数。
我将其包含在我的用户脚本中。我怎样才能得到document.write的参数。我的代码有什么错误吗?