diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-08-29 20:56:20 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-08-29 20:56:20 +0900 |
commit | dc4286460791c3b76fe29d085502a11c61c78551 (patch) | |
tree | 5b9dc747f83e13d6b827a4a0894c57b82b3df456 /src/command-line/command-line-frame.js | |
parent | a808b2894090f30e65f396f7caa5af36af83442c (diff) |
use iframe-ed command-line
Diffstat (limited to 'src/command-line/command-line-frame.js')
-rw-r--r-- | src/command-line/command-line-frame.js | 19 |
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(); + } +} |