Skip to content

Conversation

@nairmanu
Copy link
Collaborator

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds comprehensive API availability checks before proxying CSS and Element APIs to prevent runtime errors in edge case environments where these browser APIs may not be fully available or have been modified.

Changes:

  • Added null/undefined safety checks for CSSStyleSheet, CSSMediaRule, and Element constructors and their prototypes before attempting to proxy their methods
  • Ensures that all five proxy operations (insertRule, deleteRule for both CSSStyleSheet and CSSMediaRule, plus attachShadow for Element) consistently verify API availability

@nairmanu nairmanu merged commit ae09297 into master Jan 30, 2026
11 checks passed
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.

4 participants