Internet Explorer等同于window.performance.memory?

问题描述 投票:4回答:1

有谁知道IE是否有相当于Chrome的window.peformance.memory财产?

我试图找到一种方法来分析我的应用程序中的IE的内存性能。

使用Chrome浏览器运行我的js脚本没问题,因为Chrome已经为memory添加了专有的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);

   }
});
javascript memory browser
1个回答
1
投票

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键enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.