show error on find and wrap search

This commit is contained in:
Shin'ya Ueoka 2017-11-11 15:53:46 +09:00
parent 6db2458929
commit 12db4943ee
4 changed files with 83 additions and 15 deletions

View file

@ -1,4 +1,5 @@
import './console-frame.scss';
import messages from 'shared/messages';
const initialize = (doc) => {
let iframe = doc.createElement('iframe');
@ -20,4 +21,11 @@ const postMessage = (doc, message) => {
iframe.contentWindow.postMessage(JSON.stringify(message), '*');
};
export { initialize, blur, postMessage };
const postError = (doc, message) => {
return postMessage(doc, {
type: messages.CONSOLE_SHOW_ERROR,
text: message,
});
};
export { initialize, blur, postMessage, postError };