File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -79,16 +79,19 @@ double get_date_now();
7979Page visibility lets your app detect whether it is currently visible to the user.
8080
8181``` cpp
82- webcc::string get_visibility_state (); // "visible", "hidden", etc.
83- uint8 is_hidden (); // 1 when hidden, 0 otherwise
82+ webcc::string get_visibility_state (); // Usually "visible" or "hidden"
83+ uint8_t is_hidden (); // 1 when hidden, 0 otherwise
8484void init_visibility_change ();
8585```
8686
87+ Use ` is_hidden() ` when you only need a fast boolean-style check.
88+ Use ` get_visibility_state() ` when you want the exact browser-reported state string.
89+
8790After calling ` init_visibility_change() ` , visibility updates are emitted through the event system.
8891
8992``` cpp
9093struct VisibilityChangeEvent {
91- uint8 hidden;
94+ uint8_t hidden;
9295 webcc::string_view state;
9396};
9497```
You can’t perform that action at this time.
0 commit comments