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

How to empty network HARLog in Chrome extension development?

  •  
  •   haiyang5210 · Feb 28, 2018 · 2848 views
    This topic created in 3031 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
        1
    haiyang5210  
    OP
       Feb 28, 2018
    Up
    haiyang5210
        2
    haiyang5210  
    OP
       Apr 16, 2018
    Up too
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   922 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 20:47 · PVG 04:47 · LAX 13:47 · JFK 16:47
    ♥ Do have faith in what you're doing.