support about:debugging#tabs when connected to a remote instance
MozReview-Commit-ID: LJEIUR4xi0d
--- a/devtools/client/aboutdebugging/components/tabs/target.js
+++ b/devtools/client/aboutdebugging/components/tabs/target.js
@@ -13,17 +13,27 @@ const Services = require("Services");
const Strings = Services.strings.createBundle(
"chrome://devtools/locale/aboutdebugging.properties");
module.exports = createClass({
displayName: "TabTarget",
debug() {
let { target } = this.props;
- window.open("about:devtools-toolbox?type=tab&id=" + target.outerWindowID);
+ let id = target.outerWindowID;
+ let toolboxUrl = "about:devtools-toolbox?type=tab&id=" + id;
+
+ let url = new window.URL(window.location.href.replace("about:", "http://"));
+ let host = url.searchParams.get("host");
+ let port = url.searchParams.get("port");
+ if (host && port) {
+ toolboxUrl += `&host=${host}&port=${port}`;
+ }
+
+ window.open(toolboxUrl);
},
render() {
let { target } = this.props;
return dom.div({ className: "target-container" },
dom.img({
className: "target-icon",