如何使用 net/xhr.getRequestCount()
How to use net/xhr.getRequestCount()
the net/xhr
module includes a method called getRequestCount()
的文档应该
Return[s] the number of XMLHttpRequest objects that are alive (i.e., currently active or about to be).
双方都在呼叫
const xhr = require("sdk/net/xhr");
var x = new xhr.XMLHttpRequest();
x.getRequestCount();
和
xhr.getRequestCount();
失败 TypeError
。在调试器中,您会看到 XMLHttpRequest
及其原型都没有这样的功能。 (jpm 版本 1.0.5)
你应该如何使用它?
显然这个功能在很久以前就被删除了(https://hg.mozilla.org/mozilla-central/rev/b57750ca97bf 从 2013 年开始)并且没有人记得更新文档。
简而言之:您不应该使用它。
the net/xhr
module includes a method called getRequestCount()
的文档应该
Return[s] the number of XMLHttpRequest objects that are alive (i.e., currently active or about to be).
双方都在呼叫
const xhr = require("sdk/net/xhr");
var x = new xhr.XMLHttpRequest();
x.getRequestCount();
和
xhr.getRequestCount();
失败 TypeError
。在调试器中,您会看到 XMLHttpRequest
及其原型都没有这样的功能。 (jpm 版本 1.0.5)
你应该如何使用它?
显然这个功能在很久以前就被删除了(https://hg.mozilla.org/mozilla-central/rev/b57750ca97bf 从 2013 年开始)并且没有人记得更新文档。
简而言之:您不应该使用它。