ios html 调试,使用iframe和vconsole调试ios网页
首先在低版本的ios瀏覽器, 即使開(kāi)啟調(diào)試也因?yàn)殡娔X端版本太新, 無(wú)法查看webview或者瀏覽器中的log, 真的是垃圾
下載 開(kāi)發(fā)者版本的Safari也不行
只能使用一個(gè)殼子, 將目標(biāo)網(wǎng)頁(yè)放到iframe中, 然后在外部捕獲異常, 在外部的vconsole中查看log信息
Documentnew VConsole();
setTimeout(function() {
var f = document.createElement("iframe");
f.src = "http://www.baidu.com";
document.body.appendChild(f);
f.contentWindow.onload = function() {
alert("error load");
};
f.onload = function() {
alert("error load");
f.contentWindow.onerror = function() {
alert("error caught");
};
};
f.contentWindow.onerror = function() {
alert("error caught");
};
}, 1000);
總結(jié)
以上是生活随笔為你收集整理的ios html 调试,使用iframe和vconsole调试ios网页的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 内存产品大对比:宇瞻内存真假评测揭秘
- 下一篇: c++ vector拷贝构造_vecto