зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1144392 - Show an error message in the Browser Toolbox if the connection fails. r=jryans
This commit is contained in:
Родитель
b962236373
Коммит
2cf633a3fb
|
@ -62,7 +62,13 @@ window.addEventListener("load", function() {
|
|||
let cmdClose = document.getElementById("toolbox-cmd-close");
|
||||
cmdClose.addEventListener("command", onCloseCommand);
|
||||
setPrefDefaults();
|
||||
connect().catch(Cu.reportError);
|
||||
connect().catch(e => {
|
||||
let errorMessageContainer = document.getElementById("error-message-container");
|
||||
let errorMessage = document.getElementById("error-message");
|
||||
errorMessage.value = e;
|
||||
errorMessageContainer.hidden = false;
|
||||
Cu.reportError(e);
|
||||
});
|
||||
});
|
||||
|
||||
function onCloseCommand(event) {
|
||||
|
|
|
@ -37,5 +37,9 @@
|
|||
for example when viewing network request details. -->
|
||||
<popupset id="mainPopupSet"></popupset>
|
||||
|
||||
<vbox id="error-message-container" hidden="true" flex="1">
|
||||
<box>&browserToolboxErrorMessage;</box>
|
||||
<textbox multiline="true" id="error-message" flex="1"></textbox>
|
||||
</vbox>
|
||||
<iframe id="toolbox-iframe" flex="1"></iframe>
|
||||
</window>
|
||||
|
|
|
@ -23,6 +23,10 @@
|
|||
- It allows you to switch the context of the whole toolbox. -->
|
||||
<!ENTITY toolboxFramesTooltip "Select an iframe as the currently targeted document">
|
||||
|
||||
<!-- LOCALIZATION NOTE (browserToolboxErrorMessage): This is the label
|
||||
- shown next to error details when the Browser Toolbox is unable to open. -->
|
||||
<!ENTITY browserToolboxErrorMessage "Error opening Browser Toolbox:">
|
||||
|
||||
<!-- LOCALIZATION NOTE (options.context.advancedSettings): This is the label for
|
||||
- the heading of the advanced settings group in the options panel. -->
|
||||
<!ENTITY options.context.advancedSettings "Advanced settings">
|
||||
|
|
Загрузка…
Ссылка в новой задаче