Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added condition to check if dom supports adoptedStyleSheets #1311

Merged
merged 2 commits into from
Jul 12, 2023

Conversation

shantanuk-browserstack
Copy link
Contributor

@shantanuk-browserstack shantanuk-browserstack commented Jul 12, 2023

adoptedStyleSheets is supported in Safari versions from v16.4 and in automate, Safari v16.3 is only available for the latest mac os.
So if anyone uses Safari from automate to run a test for percy, the test fails with the following error:
[percy] JavascriptError: A JavaScript exception occured: undefined is not an object (evaluating 'dom.adoptedStyleSheets')

Now a check is added to verify if adoptedStyleSheets is supported. If not supported, it will show a warning and continue processing.

@shantanuk-browserstack shantanuk-browserstack requested a review from a team as a code owner July 12, 2023 10:20
@shantanuk-browserstack shantanuk-browserstack changed the title [PER-2269] Added condition to check if dom supports adoptedStyleSheets Added condition to check if dom supports adoptedStyleSheets Jul 12, 2023
@shantanuk-browserstack shantanuk-browserstack merged commit 4005b00 into master Jul 12, 2023
34 checks passed
@shantanuk-browserstack shantanuk-browserstack deleted the safari_adoptedStyleSheets branch July 12, 2023 13:03
@shantanuk-browserstack shantanuk-browserstack added the 🧹 maintenance General maintenance label Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧹 maintenance General maintenance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants