Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change interface to property on devtool page #21004

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Enables extensions to interact with the browser's {{Glossary("Developer Tools")}

To use this API you need to have the `"devtools"` [API permission](/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/permissions#api_permissions) specified in your [manifest.json](/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json) file. This permission can not be optional.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rebloor Unrelated to what this pull request is meant to fix, it seems worth filing it as a separate issue, but I did notice it while I was looking to this diff and so I thought to mention it to you here in the meantime:

  • "devtools" API doesn't technically exist in Chromium, and in Firefox isn't mandatory, it is implicitly prompted (and granted) at install time if the extension has a "devtools_page" property in the manifest.json file (unless listed as an optional permission in Firefox >= 77)

  • in Firefox >= 77 "devtools" permission can also be listed as an optional permission, if listed as an optional permission in the manifest.json file it will not be prompted and granted at install time and the extensions is going to be responsible of requesting it using the permissions WebExtensions API

  • It may be worth to mention that the "devtools" API namespace is only available in the DevTools Extension Pages (the devtools_page and the extension devtools panels created from the devtools_page using the devtools.panels.create and devtools.panels.elements.createSidebarPane), no other extension pages (e.g. background page or action popup panels pages) can access this API namespace

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @rpl, I have created #21059 and will look into this shortly


## Interfaces
## Properties

- {{WebExtAPIRef("devtools.inspectedWindow")}}
- : Interact with the window that Developer tools are attached to (inspected window). This includes obtaining the tab ID for the inspected page, evaluate the code in the context of the inspected window, reload the page, or obtain the list of resources within the page.
Expand Down