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

[JS] [atoms] Use .textContent instead of .innerHTML in clear() action #11504

Merged
merged 1 commit into from
Feb 15, 2023

Conversation

tosmolka
Copy link
Contributor

@tosmolka tosmolka commented Jan 3, 2023

Description

This PR changes atom action clear() to use .textContent attribute instead of .innerHTML to clear the element. One exception is Firefox where it keeps current workaround.

Motivation and Context

This PR is related to issue #11461 . Atom action clear() fails on pages that require Trusted Types as it causes a Trusted Types Sink violation. This can be fixed by reimplementing the same behavior without calling into .innerHTML Trusted Types Sink.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have read the contributing document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
    • I ran action_test.html locally in a browser but I was unable to run full test suite due to unrelated issues

@CLAassistant
Copy link

CLAassistant commented Jan 3, 2023

CLA assistant check
All committers have signed the CLA.

@diemol diemol added the D-atoms label Jan 3, 2023
@diemol
Copy link
Member

diemol commented Jan 3, 2023

@titusfortner @AutomatedTester do you know how we test the atoms? What is the process to tell the drivers to update them after merging this?

@diemol
Copy link
Member

diemol commented Feb 15, 2023

On the 02.02.23 TLC meeting it was decided to merge this and then ping ChromeDriver and GeckoDriver to update their atoms.

Copy link
Member

@diemol diemol left a comment

Choose a reason for hiding this comment

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

Thank you, @tosmolka!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants