V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Get Google Chrome
Vimium · 在 Chrome 里使用 vim 快捷键
haiyang5210
V2EX  ›  Chrome

How to empty network HARLog in Chrome extension development?

  •  
  •   haiyang5210 · 2018-02-28 18:25:44 +08:00 · 2045 次点击
    这是一个创建于 2467 天前的主题,其中的信息可能已经有所发展或是发生改变。

    I'm developing an extension for Chrome recently, I need to store the network HARLog, use api like this,

    chrome.devtools.network.getHAR()
    

    After, I hope to empty HARLog, so I thought out all the chrome.devtools.network api,

    But I didn't find any api can do this job, so I inspect Chrome's Devtools Network tab, too.

    chrome-devtools://devtools/bundled/network/network_module.js
    

    There is the code how the network clear button realizing,

    NetworkLog.networkLog.reset()
    

    But when I use it in my code, there is an error: NetworkLog is undefined

    Anyone can give some suggestions?

    Thanks.

    2 条回复    2018-04-16 21:38:25 +08:00
    haiyang5210
        1
    haiyang5210  
    OP
       2018-02-28 18:26:23 +08:00
    Up
    haiyang5210
        2
    haiyang5210  
    OP
       2018-04-16 21:38:25 +08:00
    Up too
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2576 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 03:20 · PVG 11:20 · LAX 19:20 · JFK 22:20
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.