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

fix: error when trying to disable animation #1040

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

KuznetsovRoman
Copy link
Member

No description provided.

Comment on lines 192 to 202
try {
appendDisableAnimationStyleElement(root);
} catch (_) {
createDefaultTrustedTypesPolicy();

appendDisableAnimationStyleElement(root);
}
Copy link
Member Author

Choose a reason for hiding this comment

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

Creating default trusted types policy if "appendDisableAnimationStyleElement" threw

Tested on https://yandex.ru/adv/edu/events/monetizaciya-telegram-kanalov-s-reklamnoy-setu-yandeksa-kak-proyti-moderaciu#reg web page

util.forEachRoot(function (root) {
try {
appendDisableAnimationStyleElement(root);
} catch (_) {
Copy link
Member

Choose a reason for hiding this comment

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

Why not match on error - This document requires 'TrustedHTML' assignment?

@KuznetsovRoman KuznetsovRoman force-pushed the TESTPLANE-358.TrustedHTML branch from b702711 to f195956 Compare December 10, 2024 10:59
@KuznetsovRoman KuznetsovRoman force-pushed the TESTPLANE-358.TrustedHTML branch from f195956 to ee931e2 Compare December 10, 2024 11:02
@KuznetsovRoman KuznetsovRoman merged commit 59a174d into master Dec 10, 2024
2 checks passed
@KuznetsovRoman KuznetsovRoman deleted the TESTPLANE-358.TrustedHTML branch December 10, 2024 11:04
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.

2 participants