› Get Google Chrome
› Vimium · 在 Chrome 里使用 vim 快捷键
haiyang5210
V2EX  ›  Chrome

How to empty network HARLog in Chrome extension development?

  •  
  •   haiyang5210 · Feb 28, 2018 · 3245 views
    This topic created in 3175 days ago, the information mentioned may be changed or developed.

    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 replies  •  2018-04-16 21:38:25 +08:00
    haiyang5210
    haiyang5210
    OP
    Feb 28, 2018
    1
    Up
    haiyang5210
    haiyang5210
    OP
    Apr 16, 2018
    2
    Up too
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4182 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 06:35 · PVG 14:35 · LAX 22:35 · JFK 01:35
    ♥ Do have faith in what you're doing.