@hippy/devtools-protocol
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

Introduction

Chrome Devtools Protocol based on JSON-RPC. You can view verbose protocol on website

this repo is fork from ChromeDevTools/devtools-protocol and add some custom debug protocol of Hippy framework

Hot to start

add custom protocol

  1. modify JSON protocol definition in ./json/tdf_protocol.json

  2. auto generate all typescript declaration, docs: npm run build

  3. preview devtools protocol site on page: npm run site:serve

use by other project

npm i @hippy/devtools-protocol

usage: add reference to the typescript declaration of @hippy/devtools-protocol by:

// file: index.d.ts
/// <reference types="@hippy/devtools-protocol" />
registerModuleCallback(TdfCommand.TDFInspectorDumpDomTree, (error, msg) => {
  const { itree } = msg as ProtocolTdf.TDFInspector.DumpDomTreeResponse;
  this.handleReceiveDomTree(itree);
});

Readme

Keywords

none

Package Sidebar

Install

npm i @hippy/devtools-protocol

Weekly Downloads

18

Version

0.0.4

License

none

Unpacked Size

4.17 MB

Total Files

98

Last publish

Collaborators

  • raypro
  • zealotchen
  • xuqingkuang
  • zoomchan-cxj
  • ilikethese
  • ivanfanwu
  • chestershen