Skip to content

Conversation

@pm-azhar-mulla
Copy link
Contributor

Type of change

  • Feature

Description of change

Fixed : #14284

This PR addresses an issue where the Chrome AI Summarizer API initialization would fail with a NotAllowedError if the model required downloading and the page load occurred without a user gesture (sticky activation).

When Summarizer.availability() returns a status indicating a download is needed (e.g., 'after-download'), the browser prevents the download from starting unless a user gesture is present.

This change implements a robust check:

  • Verifies Summarizer.availability().
  • If a download is needed AND navigator.userActivation.isActive is false, the module now defers initialization.
  • It explicitly waits for a user interaction (using a list of activation events) before retrying the initialization.

This ensures the module does not error out silently or noisily on page load and properly initializes once the user interacts with the page, complying with valid sticky activation requirements.

Reference Links:
https://developer.chrome.com/docs/ai/get-started#user-activation
https://developer.mozilla.org/en-US/docs/Glossary/Sticky_activation

Other information

@pm-azhar-mulla pm-azhar-mulla changed the title Chrome AI Summarizer User Activation Handling WIP : Chrome AI Summarizer User Activation Handling Dec 20, 2025
@pm-azhar-mulla pm-azhar-mulla changed the title WIP : Chrome AI Summarizer User Activation Handling Chrome AI Summarizer User Activation Handling Dec 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ChromeAI module trigger download configuration

1 participant