aboutsummaryrefslogtreecommitdiff
path: root/src/console/console-frame.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/console/console-frame.js')
-rw-r--r--src/console/console-frame.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/console/console-frame.js b/src/console/console-frame.js
new file mode 100644
index 0000000..cf72f25
--- /dev/null
+++ b/src/console/console-frame.js
@@ -0,0 +1,19 @@
+import './console-frame.scss';
+
+export default class ConsoleFrame {
+ constructor(win, initial = '') {
+ let url = browser.runtime.getURL('build/console.html') +
+ '#' + encodeURIComponent(initial);
+
+ let element = window.document.createElement('iframe');
+ element.src = url;
+ element.className = 'vimvixen-console-frame';
+ win.document.body.append(element);
+
+ this.element = element;
+ }
+
+ remove() {
+ this.element.remove();
+ }
+}