-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work liste: flutter.jsIssues with Flutter web custom initialization through JS APIsIssues with Flutter web custom initialization through JS APIsplatform-webWeb applications specificallyWeb applications specificallytoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.
Description
Use case
Flutter.js currently accepts only *.dart.js and flutter_service_worker.js in its trusted types policy - see:
flutter/packages/flutter_tools/lib/src/web/file_generators/flutter_js.dart
Lines 85 to 88 in 65fd924
| 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 listHigh-priority issues at the top of the work liste: flutter.jsIssues with Flutter web custom initialization through JS APIsIssues with Flutter web custom initialization through JS APIsplatform-webWeb applications specificallyWeb applications specificallytoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.