diff options
author | 2018-12-22 15:03:46 +0100 | |
---|---|---|
committer | 2018-12-22 15:03:46 +0100 | |
commit | 5ad6eea6ea24bf6b4cdb8b314150c6fa5f9da896 (patch) | |
tree | 11907a50c6ed914c13b9264fa233ec9c03f32579 /src/models | |
parent | bump version to b22 (diff) | |
download | ferdium-app-5ad6eea6ea24bf6b4cdb8b314150c6fa5f9da896.tar.gz ferdium-app-5ad6eea6ea24bf6b4cdb8b314150c6fa5f9da896.tar.zst ferdium-app-5ad6eea6ea24bf6b4cdb8b314150c6fa5f9da896.zip |
Make electron 4 compatible
Diffstat (limited to 'src/models')
-rw-r--r-- | src/models/Service.js | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/models/Service.js b/src/models/Service.js index 4cc6102ff..84fded584 100644 --- a/src/models/Service.js +++ b/src/models/Service.js | |||
@@ -114,6 +114,13 @@ export default class Service { | |||
114 | }); | 114 | }); |
115 | } | 115 | } |
116 | 116 | ||
117 | @computed get shareWithWebview() { | ||
118 | return { | ||
119 | spellcheckerLanguage: this.spellcheckerLanguage, | ||
120 | isDarkModeEnabled: this.isDarkModeEnabled, | ||
121 | }; | ||
122 | } | ||
123 | |||
117 | @computed get url() { | 124 | @computed get url() { |
118 | if (this.recipe.hasCustomUrl && this.customUrl) { | 125 | if (this.recipe.hasCustomUrl && this.customUrl) { |
119 | let url; | 126 | let url; |
@@ -162,14 +169,14 @@ export default class Service { | |||
162 | return userAgent; | 169 | return userAgent; |
163 | } | 170 | } |
164 | 171 | ||
165 | initializeWebViewEvents(store) { | 172 | initializeWebViewEvents({ handleIPCMessage, openWindow }) { |
166 | this.webview.addEventListener('ipc-message', e => store.actions.service.handleIPCMessage({ | 173 | this.webview.addEventListener('ipc-message', e => handleIPCMessage({ |
167 | serviceId: this.id, | 174 | serviceId: this.id, |
168 | channel: e.channel, | 175 | channel: e.channel, |
169 | args: e.args, | 176 | args: e.args, |
170 | })); | 177 | })); |
171 | 178 | ||
172 | this.webview.addEventListener('new-window', (event, url, frameName, options) => store.actions.service.openWindow({ | 179 | this.webview.addEventListener('new-window', (event, url, frameName, options) => openWindow({ |
173 | event, | 180 | event, |
174 | url, | 181 | url, |
175 | frameName, | 182 | frameName, |