Welcome Guest Search | Active Topics | Sign In | Register

Page Visibility API Options
rainstuff
Posted: Monday, May 24, 2021 7:52:14 AM
Rank: Advanced Member
Groups: Member

Joined: 9/20/2016
Posts: 73
Hi! In Chrome or Firefox, when I go to a new tab and back, the visibility event is triggered.
But in the tabbed browser - no changes.
Is it possible to use this technique in EO.TabbedBrowser ?

You can check it out here: https://www.acme.com/webapis/visibility.html

Thanx
eo_support
Posted: Monday, May 24, 2021 5:07:24 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Hi,

We have confirmed this to be an issue and this will be supported in our next build.

In our next build document.visibilityState will change to "hidden" when the WebControl's size changes to zero and will change back to "visible" when its size is set to non-zero. Depending on your code structure, this may happen automatically or requires you to write code to explicitly set the WebControl's size. For example, in a Windows.Forms application, if you have a WebControl in the Form and it's Dock is to set to Fill, then minimize the form will automatically set the WebControl's size to 0 and trigger visibility change to "hidden". When you restore the form, it will automatically resize the form along with the WebControl to its original size thus trigger visiblity change to "visible". In other scenarios, for example, if you have a tabbed interface, then you will need to explicitly resize the WebControl in order to trigger this event.

Thanks!
rainstuff
Posted: Tuesday, May 25, 2021 2:20:53 AM
Rank: Advanced Member
Groups: Member

Joined: 9/20/2016
Posts: 73
Hi! Thank you.
It might be easier to add a property to the WebView and use it when needed?
Sometimes I do not need actually hide the page.
eo_support
Posted: Tuesday, May 25, 2021 9:12:40 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Hi,

Adding a property to the WebView is technically doable but the size mechanism described in our previous reply is how things works internally in the Chromium engine. That mechanism is hardwired across many places but our current version does not expose it. Adding a property would require extensive change inside the browser engine so it would not be a good choice to support this feature.

Thanks!
rainstuff
Posted: Wednesday, May 26, 2021 4:27:47 AM
Rank: Advanced Member
Groups: Member

Joined: 9/20/2016
Posts: 73
Ok, I understood.
I found a way to implement what I want via webview.JSInitCode

Thank you
eo_support
Posted: Wednesday, May 26, 2021 9:54:22 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
You are welcome. Please feel free to let us know if there is anything else.


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.