aboutsummaryrefslogtreecommitdiff
path: root/src/command-line/command-line-frame.js
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2017-08-29 21:32:35 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2017-08-29 21:32:35 +0900
commitf1b9c6ba9d33fe1927c4855d4981d88ad73d5818 (patch)
treece65ff2c7979d27d86049d5cb13a6d43672817dc /src/command-line/command-line-frame.js
parent21404ad534278eff643be089da9c07882b29da82 (diff)
parentb711678329463d1ec5f2eb9db99f99af5b69895e (diff)
Merge branch 'iframe-command-line'
Diffstat (limited to 'src/command-line/command-line-frame.js')
-rw-r--r--src/command-line/command-line-frame.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/command-line/command-line-frame.js b/src/command-line/command-line-frame.js
new file mode 100644
index 0000000..3f1dda4
--- /dev/null
+++ b/src/command-line/command-line-frame.js
@@ -0,0 +1,19 @@
+import './command-line-frame.scss';
+
+export default class CommandLineFrame {
+ constructor(win, initial = '') {
+ let url = browser.runtime.getURL('build/command-line.html') +
+ '#' + encodeURIComponent(initial);
+
+ let element = window.document.createElement('iframe');
+ element.src = url;
+ element.className = 'vimvixen-command-line-frame';
+ win.document.body.append(element);
+
+ this.element = element;
+ }
+
+ remove() {
+ this.element.remove();
+ }
+}