Document hooking into the Network panel of DevTools (for plugins)
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 45/100
- issue の種類
- ドキュメント
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- devtools, javascript, typescript
調査の方向性
まず、現在の Debugging ドキュメントと、古い内容で参照されている現在の debugger.ts インターフェースを見つけます。Network パネルのコールバックを確認し、古いリンクと例を最新のコア API のガイダンスに置き換えます。プラグイン作成者向けの独立したガイドで、現在のリクエストとレスポンスのライフサイクルを正確に説明できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
There are global APIs to list Netowork requests in the DevTools Network panel, we should document these in a guide for plugin authors. This used to be part of the "Debugging" docs, however it doesn't quite fit there.
The content itself needs to be reviewed and updated to reflect latest core (the API is mostly unchanged, but the docs contain old links).
Old content for reference
Network requests in plugins - Note: The following content concerns only plugin authors who wrap and expose Android (Network agent in DevTools not yet supported with a public API in the iOS runtime) http functionalities. To make your http functionality debuggable, there are callbacks you need to call at certain times of the lifecycle of the network request, following a specific protocol. For your convenience, we've exposed callbacks and TypeScript interfaces to facilitate sending information to the Network agent.
- Immediately before making the request:
Check if theglobal.__inspectorobject is available, and whether the DevTools are connected:
if (global.__inspector && global.__inspector.isConnected) {
}
Build a RequestData-compliant object, as declared in the debugger module. RequestData contains the minimum subset of properties needed to display request entries in the Network panel. Finally call to the runtime-exposed callback:
global.__inspector.requestWillBeSent(requestData)
-
When a response is received:
Check if the
global.__inspectorobject is available, and whether the DevTools are connected, as shown above. Build a ResponseData-compliant object, as declared in the debugger module.ResponseDatacontains the minimum subset of properties needed to display the response for a completed request.Build a LoadingFinishedData compliant object, as declared in the debugger module. The object notifies the Network agent that a request has completed, as well as the time spent.
Build a SuccessfulRequestData-compliant object, as declared in the debugger module. The object contains the response data, in a string format, the Id of the original request the response data corresponds to, and information whether the content should be base64-encoded, or not.
Finally call the following runtime-exposed callbacks:
global.__inspector.responseReceived(responseData) global.__inspector.loadingFinished({ requestId: requestIdStr, timestamp: getTimeStamp(), }) global.__inspector.dataForRequestId(successfulRequestData)
- 主要言語
- JavaScript
- スター
- 17
- フォーク
- 31
- 平均マージ
- 8時間 51分
- マージ済み PR(30日)
- 2
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NativeScript/docs のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
NativeScript/docs#177 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 38/100
NativeScript/docs#189 ·
-
Label: maxLines オープン
難易度 1/5 1時間未満 初心者へのやさしさ 48/100
NativeScript/docs#182 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
NativeScript/docs#178 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
NativeScript/docs#159 ·
NativeScript/docs の issue をすべて見る
似ている issue
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
githubnext/gh-aw-workshop#3692 ·
-
agent/guide documentation hive/hosted-available-lke648397-260827-5n31
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
-
Add: BuyPass TV オープンchannels:add check:passed
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
S: triage
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
apache/cloudstack#14222 ·