Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]: add method: SetPageFrozen to webContents #28322

Open
3 tasks done
replace5 opened this issue Mar 22, 2021 · 4 comments
Open
3 tasks done

[Feature Request]: add method: SetPageFrozen to webContents #28322

replace5 opened this issue Mar 22, 2021 · 4 comments

Comments

@replace5
Copy link

replace5 commented Mar 22, 2021

Preflight Checklist

Problem Description

If a window has many webview, the hidden webview is not throttling timer like FreezePage to improve performance

Proposed Solution

add method: SetPageFrozen to webContents, when webview is hidden, SetVisibilityState call SetVisibilityState to Freeze the webview

@replace5 replace5 changed the title [Feature Request]: add method: SetVisibilityState/GetVisibilityState to webContents [Feature Request]: add method: SetPageFrozen to webContents Mar 22, 2021
@pushkin-
Copy link

seems like a backgroundThrottling configuration like the one in BrowserWindow would be more appropriate than an API

@replace5
Copy link
Author

seems like a backgroundThrottling configuration like the one in BrowserWindow would be more appropriate than an API

backgroundThrottling run only window minimize, I want run with webview like chrome tabs

@pushkin-
Copy link

@replace5 Yeah, I'm not saying to use backgroundThrottling. I'm just saying that a configuration for webviews similar to the one for the window is perhaps more appropriate than calling an API to freeze the webcontents.

@replace5
Copy link
Author

@replace5 Yeah, I'm not saying to use backgroundThrottling. I'm just saying that a configuration for webviews similar to the one for the window is perhaps more appropriate than calling an API to freeze the webcontents.

Yes, When WebView become hidden, freeze the webcontents; when visible, unfreeze

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants