Skip to content

[web] Trusted Types validation is too strict in flutter loader. #120483

@ditman

Description

@ditman

Use case

Flutter.js currently accepts only *.dart.js and flutter_service_worker.js in its trusted types policy - see:

const patterns = validPatterns || [
/\.dart\.js$/,
/^flutter_service_worker.js$/
];

Internally, we want to be able to pass names that don't follow the conventions specified above, so we probably should relax the default (at least until it's more easily overridable).

Proposal

Relax the default so it accepts any .js script.

As reported in b/268285339 by @jacobsimionato

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work liste: flutter.jsIssues with Flutter web custom initialization through JS APIsplatform-webWeb applications specificallytoolAffects the "flutter" command-line tool. See also t: labels.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions