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

Use DOM API instead of creating Trusted Types policy to append a markup #1627

Merged
merged 1 commit into from
Jan 15, 2021
Merged

Conversation

shhnjk
Copy link
Contributor

@shhnjk shhnjk commented Jan 14, 2021

Trusted Types policy creation fails when there is a Trusted Type policy enforcement on the document and addResizeListener is called twice.
Use DOM API to create the same tree so that we don't need to make Trusted Types policy creation little more complicated.

@shhnjk shhnjk merged commit e360d95 into bvaughn:master Jan 15, 2021
@matiastucci
Copy link

matiastucci commented Feb 3, 2021

@bvaughn any ETA for next release so I get this change? Thanks!

EDIT: I just pinned my version to 9.22.2

@Blacknikomo
Copy link

Blacknikomo commented Apr 7, 2021

Hi! We faced an issue when react-virtualized tries to create the Trusted Policy entries several times.
We recreate some components according to the router state. Some of these components consume the React-Virtualized instances. Since every time we rerender components from a scratch, we also force Library to re-register Trusted Policies.

We have an instance, where CSP rules are strict. In our case, it's forbidden to reinitialize the Trusted policy. Hence the browser throws the error "Failed to execute createPolicy on TrustedTypePolicyFactory': Policy with name react-virtualized-auto-sizer already exists".

I didn't dive deeper into the issue, since in this commit the Trusted Types are completely removed, but if you need further details - let me know. I'll try to make a pen.

The main problem for now is: this change not appeared in the 9.22.3 version. I kindly ask you to publish the next version, which contains the fix.

@Blacknikomo
Copy link

Blacknikomo commented May 11, 2021

Hi Brian! Can you have a look here, please?
@bvaughn

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.

3 participants