aboutsummaryrefslogtreecommitdiff
path: root/src/console/console-frame.js
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2017-09-03 17:48:46 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2017-09-03 17:48:46 +0900
commit8cabd68b927fe7022efa11dee082aafe8c2d4f30 (patch)
tree3cdcc1f557d148cd70a16b767e88b19220761e51 /src/console/console-frame.js
parent044f24efb64ec52dfdb02e0e0807bc4545c4a21c (diff)
parent29f82d3a7f339fa99759b589923f0d8657da28f5 (diff)
Merge branch 'buffer'
Diffstat (limited to 'src/console/console-frame.js')
-rw-r--r--src/console/console-frame.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/console/console-frame.js b/src/console/console-frame.js
index aabb96a..ea9f523 100644
--- a/src/console/console-frame.js
+++ b/src/console/console-frame.js
@@ -10,6 +10,8 @@ export default class ConsoleFrame {
this.element = element;
+ this.errorShown = true;
+
this.hide();
}
@@ -21,6 +23,7 @@ export default class ConsoleFrame {
text: text
};
messages.send(this.element.contentWindow, message);
+ this.errorShown = false;
}
showError(text) {
@@ -31,6 +34,8 @@ export default class ConsoleFrame {
text: text
};
messages.send(this.element.contentWindow, message);
+ this.errorShown = true;
+ this.element.blur();
}
showFrame() {
@@ -40,5 +45,10 @@ export default class ConsoleFrame {
hide() {
this.element.style.display = 'none';
this.element.blur();
+ this.errorShown = false;
+ }
+
+ isErrorShown() {
+ return this.element.style.display === 'block' && this.errorShown;
}
}