Add trusted types to react on client side (#16157)

* Add trusted types to react on client side

* Implement changes according to review

* Remove support for trusted URLs, change TrustedTypes to trustedTypes

* Add support for deprecated trusted URLs

* Apply PR suggesstions

* Warn only once, remove forgotten check, put it behind a flag

* Move comment

* Fix PR comments

* Fix html toString concatenation

* Fix forgotten else branch

* Fix PR comments
This commit is contained in:
Emanuel Tesař
2019-09-16 13:43:22 +01:00
committed by Dan Abramov
parent cdbfa5044b
commit b8d079b413
18 changed files with 259 additions and 19 deletions
+2
View File
@@ -21,6 +21,8 @@ module.exports = {
process: true,
setImmediate: true,
Buffer: true,
// Trusted Types
trustedTypes: true,
// Scheduler profiling
SharedArrayBuffer: true,
+2
View File
@@ -22,6 +22,8 @@ module.exports = {
// Node.js Server Rendering
setImmediate: true,
Buffer: true,
// Trusted Types
trustedTypes: true,
// Scheduler profiling
SharedArrayBuffer: true,
+2
View File
@@ -21,6 +21,8 @@ module.exports = {
// Fabric. See https://github.com/facebook/react/pull/15490
// for more information
nativeFabricUIManager: true,
// Trusted Types
trustedTypes: true,
// Scheduler profiling
SharedArrayBuffer: true,
+2
View File
@@ -24,6 +24,8 @@ module.exports = {
define: true,
require: true,
global: true,
// Trusted Types
trustedTypes: true,
// Scheduler profiling
SharedArrayBuffer: true,