[tool][web] Makes flutter.js more G3 friendly. (#120504)
* Allow any JS file in flutter loader. * Nag only if service worker API is completely unavailable. * Add info about Secure Contexts if that may be the reason why serviceworker is not available. * Update sanity test. * If service worker settings are null, do not even check if the API is available.
This commit is contained in:
@@ -881,6 +881,8 @@ void main() {
|
||||
flutter_js.generateFlutterJsFile(fileGeneratorsPath);
|
||||
expect(flutterJsContents, contains('"use strict";'));
|
||||
expect(flutterJsContents, contains('main.dart.js'));
|
||||
expect(flutterJsContents, contains('if (!("serviceWorker" in navigator))'));
|
||||
expect(flutterJsContents, contains(r'/\.js$/,'));
|
||||
expect(flutterJsContents, contains('flutter_service_worker.js?v='));
|
||||
expect(flutterJsContents, contains('document.createElement("script")'));
|
||||
expect(flutterJsContents, contains('"application/javascript"'));
|
||||
|
||||
Reference in New Issue
Block a user