Closed
Bug 1398729
Opened 7 years ago
Closed 7 years ago
Support devtools.panels.elements sidebar.setExpression API method
Categories
(WebExtensions :: Developer Tools, defect, P2)
WebExtensions
Developer Tools
Tracking
(firefox57 verified, firefox58 verified, firefox59 verified)
VERIFIED
FIXED
mozilla57
People
(Reporter: rpl, Assigned: rpl)
References
(Blocks 1 open bug)
Details
(Keywords: dev-doc-complete)
Attachments
(3 files)
As a follow up to Bug 1341305, which has introduced the devtools.panels.elements.createSidebarPane and an initial subset of the APIs provided by the resolved sidebar API object (sidebar.onShown/onHidden and sidebar.setObject), the goal of this issue is to provide the sidebar.setExpression API method, which populate the sidebar's object TreeView with the result of the evaluation of the given expression.
Assignee | ||
Updated•7 years ago
|
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Updated•7 years ago
|
Attachment #8906570 -
Flags: review?(aswan)
Attachment #8906571 -
Flags: review?(aswan)
Comment 3•7 years ago
|
||
mozreview-review |
Comment on attachment 8906570 [details]
Bug 1398729 - Share devtools.inspectedWindow.eval helper methods in ext-devtools API module.
https://reviewboard.mozilla.org/r/178316/#review183502
Just FYI, I think Kris is trying to avoid using import-globals-from eslint comments but I don't know eactly what his plans are and this matches the existing style.
Attachment #8906570 -
Flags: review?(aswan) → review+
Comment 4•7 years ago
|
||
mozreview-review |
Comment on attachment 8906571 [details]
Bug 1398729 - Support devtools.panels.elements sidebar.setExpression API method.
https://reviewboard.mozilla.org/r/178318/#review183506
::: browser/components/extensions/ext-devtools-panels.js:379
(Diff revision 1)
>
> this.devtools_panels = class extends ExtensionAPI {
> getAPI(context) {
> + // Lazily retrieved inspectedWindow actor front per child context
> + // (used by Sidebar.setExpression).
> + let waitForInspectedWindowFront;
Why is this a promise and not the actual thing the promise resolves to?
Attachment #8906571 -
Flags: review?(aswan) → review+
Assignee | ||
Comment 5•7 years ago
|
||
mozreview-review-reply |
Comment on attachment 8906571 [details]
Bug 1398729 - Support devtools.panels.elements sidebar.setExpression API method.
https://reviewboard.mozilla.org/r/178318/#review183506
> Why is this a promise and not the actual thing the promise resolves to?
we save the returned promise instead of the resolved value to prevent a race ( https://bugzilla.mozilla.org/show_bug.cgi?id=1300584#c51 ).
Assignee | ||
Comment 6•7 years ago
|
||
(In reply to Andrew Swan [:aswan] from comment #3)
> Comment on attachment 8906570 [details]
> Bug 1398729 - Share devtools.inspectedWindow.eval helper methods in
> ext-devtools API module.
>
> https://reviewboard.mozilla.org/r/178316/#review183502
>
> Just FYI, I think Kris is trying to avoid using import-globals-from eslint
> comments but I don't know eactly what his plans are and this matches the
> existing style.
Oh yeah you are right (and thanks for pointing it out)
I've been following the discussion on the related bugzilla issue (Bug 1372406) and I thought that in the meantime it is better to keep it consistent to the current style so that we can more easily migrate them to the new convention all at once.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Pushed by luca.greco@alcacoop.it:
https://hg.mozilla.org/integration/autoland/rev/d3df8bc53dcb
Share devtools.inspectedWindow.eval helper methods in ext-devtools API module. r=aswan
https://hg.mozilla.org/integration/autoland/rev/7ef7bcbd8884
Support devtools.panels.elements sidebar.setExpression API method. r=aswan
Comment 10•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/d3df8bc53dcb
https://hg.mozilla.org/mozilla-central/rev/7ef7bcbd8884
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox57:
--- → fixed
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
Assignee | ||
Updated•7 years ago
|
Keywords: dev-doc-needed
Comment 11•7 years ago
|
||
Docs notes are in bug 1341305, comment 29.
Updated•7 years ago
|
Keywords: dev-doc-needed → dev-doc-complete
Comment 12•7 years ago
|
||
I can reproduce this issue on Firefox 56.0.2 (20171024165158) under Wind 7 64-bit.
The next error is displayed in the browser console:
TypeError: chrome.devtools.panels.elements.createSidebarPane is not a function devtools_page.js:1:1
This issue is verified as fixed on Firefox 59.0a1 (20171128100440), Firefox 58.0b7 (20171127135700) and Firefox 57.0 (20171112125346) under Win 7 64-bit and Mac OS X 10.13.1
Please see the attached screenshots.
Updated•6 years ago
|
Product: Toolkit → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•