有谁知道IE是否具有Chrome的window.peformance.memory属性?
我试图找到一种方法来分析我的应用程序中的IE的内存性能.
使用Chrome浏览器运行我的js脚本没有问题,因为Chrome已向window.performance添加了专有内存属性(有关详细信息,请参阅window.performance.memory).
我在Chrome中的方式是这样的:
browser.driver.executeScript(function () {
return window.performance.memory; // this is the problem, IE has no memory property
}).then(function (result) {
logResults(result.jsHeapSizeLimit);
logResults(result.usedJSHeapSize);
logResults(result.totalJSHeapSize);
}
});
最佳答案 Internet Explorer,使用navigation.performance进行其他类型的测量.更多参考速度.
https://developer.mozilla.org/en-US/docs/Web/API/Performance
例如:window.performance.now()
在此页面上,您可以看到可以使用Internet Explorer或其他浏览器获取的所有数据.您必须在网址中输入Internet Explorer,才能使用浏览器查看数据
https://browserleaks.com/javascript
其他选项使用:CTRL Shift U键