use iframe-ed command-line

This commit is contained in:
Shin'ya Ueoka 2017-08-29 20:56:20 +09:00
parent a808b28940
commit dc42864607
6 changed files with 140 additions and 26 deletions
src/command-line

View file

@ -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();
}
}