mirror of
https://github.com/zulip/zulip-desktop.git
synced 2025-10-25 00:53:39 +00:00
* This will make sure that the current server webview will not reload due to URL change. * Add an option to allow users to download the file attachments. Improves: #469.
10 lines
408 B
JavaScript
10 lines
408 B
JavaScript
// this hidden webview will be used to open pdf url and
|
|
// save it to user's computer without triggering a reload
|
|
// when navigating to pdf url to download it.
|
|
const hiddenWebView = document.createElement('webview');
|
|
hiddenWebView.classList.add('download-webview');
|
|
hiddenWebView.src = 'about:blank';
|
|
document.querySelector('#webviews-container').appendChild(hiddenWebView);
|
|
|
|
module.exports = hiddenWebView;
|