diff options
Diffstat (limited to 'src/content/console-frames.js')
-rw-r--r-- | src/content/console-frames.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/content/console-frames.js b/src/content/console-frames.js index 3f06466..35b975f 100644 --- a/src/content/console-frames.js +++ b/src/content/console-frames.js @@ -15,4 +15,9 @@ const blur = (doc) => { iframe.blur(); }; -export { initialize, blur }; +const postMessage = (doc, message) => { + let iframe = doc.getElementById('vimvixen-console-frame'); + iframe.contentWindow.postMessage(JSON.stringify(message), '*'); +}; + +export { initialize, blur, postMessage }; |