Contents

View and input coordination

Display content in the browser’s UI that an extension renders.

Overview

Manage the appearance of visual content across your browser app’s main process and its extensions. Your app controls the visibility of views and layers, ensures responsive page rendering, and dynamically adjusts to changes in input device capabilities, which can affect how web content displays.

Adjust user interface based on hover state

Add support for multiple input methods that a person might use with your browser app. For example, someone might connect or disconnect a mouse or trackpad: web pages use CSS media queries like @media (hover: hover) to adapt their interface based on hover support of the primary input device.

To support hover state changes, use the GCMouse class of the Game Controller framework. Listen for GCMouseDidConnectNotification and GCMouseDidDisconnectNotification to detect when a mouse or trackpad connects or disconnects. Then, implement an internal hover state in your browser app that updates when these notifications occur, and re-evaluate CSS @media (hover) queries in the rendered content.

Topics

Layer hosting

Visibility propagation

See Also

Web content