javascript - chrome.loadTimes() 修复控制台中已弃用的 Google Chrome 代码?
问题描述
[控制台日志谷歌浏览器][1]
如何使用以下代码解决问题?谢谢
• content.js:4 [弃用] chrome.loadTimes() 已弃用,而是使用标准化 API:导航计时 2 中的 nextHopProtocol。https: //www.chromestatus.com/features/5637885046816768。
// send spdy info for current page
chrome.runtime.sendMessage({
spdy: loadTimes.wasFetchedViaSpdy,
info: loadTimes.npnNegotiatedProtocol || loadTimes.connectionInfo
});
chrome.runtime.onMessage.addListener(function (res, sender, sendResponse) {
chrome.runtime.sendMessage({
spdy: loadTimes.wasFetchedViaSpdy,
info: loadTimes.npnNegotiatedProtocol || loadTimes.connectionInfo
});
});```
[1]: https://i.stack.imgur.com/HcOZM.png
解决方案
推荐阅读
- youtrack - Office 组织 (sharepoint) 的 Jetbrains Hub Microsoft auth 模块配置
- mysql - 有没有办法使用 JPA 查询更新 SET 类型列?
- kubernetes - 基于 NATS 服务器中发布的事件数量的水平缩放
- rust - 如何错误处理字符串到浮点数的转换
- python - Pandas read_html() 没有在表格中给出我的所有条目
- c++ - 将指向任何类型的指针转换为用于算术的 char 指针是否安全且可移植?
- php - WP 管理员 ajax 返回 404
- postgresql - 如何使用 Circe 从 Doobie Scala PostgreSQL 数据库中读取 JSON?
- firebase - Firebase 身份验证上的 Flutter 应用程序错误
- windows-subsystem-for-linux - 如何将 vdhx 文件注册为 WSL 2?