devtools.inspectedWindow

メモ: このページは Firefox 54 に存在する WebExtensions devtools APIs を記述しています。この API は Chrome devtools APIs に基づいていますが、Firefox では実装されていない多くの機能があり、よってここに文書化されていません。現在欠けている機能を見るには、 Limitations of the devtools APIs を見てください。

devtools.inspectedWindow API によって開発ツール拡張機能では開発ツールが割当てられたウィンドウと相互作用できます。

すべての devtools API と同様に、この API は manifest.json devtools_page キー内に定義されたドキュメントや、拡張機能が作成するその他の開発ツールドキュメント(例えば拡張機能が作ったパネル自身のドキュメント)の中だけでコードを利用できます。詳細は developer tools の拡張 を見てください。

プロパティ

devtools.inspectedWindow.tabId

開発ツールが付属しているウィンドウの ID

Functions

devtools.inspectedWindow.eval()

ターゲットウィンドウ内の JavaScript を評価する

devtools.inspectedWindow.reload()

ターゲットウィンドウのドキュメントを再読み込みする

ブラウザーの互換性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Firefox for Android
Safari on iOS
inspectedWindow
Resource
Resource.getContent
Resource.setContent
Resource.url
eval
eval.$0
eval.expression
eval.inspect
eval.options
options.contextSecurityOrigin
options.frameURL
options.scriptExecutionContext
options.useContentScriptContext
getResources
onResourceAdded
onResourceContentCommitted
reload
tabId

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
See implementation notes.

Example extensions

メモ: この API は Chromium の chrome.devtools.inspectedWindow API に基づいています。また、このドキュメントは bookmarks.json における Chromium のコードに基づいています。Microsoft Edge での実装状況は Microsoft Corporation から提供されたものであり、ここでは Creative Commons Attribution 3.0 United States License に従っています。