diff --git a/docs/documentation/chrome-har/index.md b/docs/documentation/chrome-har/index.md index a95e3d2df..45aa241e8 100644 --- a/docs/documentation/chrome-har/index.md +++ b/docs/documentation/chrome-har/index.md @@ -16,3 +16,23 @@ twitterdescription: Create [HAR](http://www.softwareishard.com/blog/har-12-spec/) files based on [Chrome Debugging Protocol](https://developer.chrome.com/devtools/docs/debugger-protocol) data. Code originally extracted from [Browsertime](https://github.com/sitespeedio/browsertime), initial implementation inspired by [Chromedriver_har](https://github.com/woodsaj/chromedriver_har). + + +## Introduction + +Chrome-HAR is for tool makers: Get the log from the Chrome Debugging Protocol and use Chrome-HAR to parse it to a HAR. + +## Example + +Convert your messages to a HAR file. + +~~~ +const parser = require('chrome-har'); + +// you already have the message from Chrome Debugging Protocol + +parser.harFromMessages(messages)) + .then(har => { + // do whatever you want with the HAR file + }) +~~~