Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class FirebaseCoreWeb extends FirebasePlatform {
script.crossOrigin = 'anonymous';
script.text = '''
window.ff_trigger_$windowVar = async (callback) => {
callback(await import("${trustedUrl?.toString() ?? src}"));
callback(await import("${trustedUrl?.toStringJS() ?? src}"));
};
''';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,12 @@ extension DomTrustedTypePolicyExtension on DomTrustedTypePolicy {
@anonymous
abstract class DomTrustedScriptUrl {}

/// (Some) methods of the [DomTrustedScriptUrl]
extension DomTrustedScriptUrlExtension on DomTrustedScriptUrl {
@JS('toString')
external String toStringJS();
}

// Getters

/// window.trustedTypes (may or may not be supported by the browser)
Expand Down
2 changes: 1 addition & 1 deletion packages/firebase_core/firebase_core_web/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: firebase_core_web
description: The web implementation of firebase_core
homepage: https://github.com/firebase/flutterfire/tree/master/packages/firebase_core/firebase_core_web
repository: https://github.com/firebase/flutterfire/tree/master/packages/firebase_core/firebase_core_web
version: 2.2.0
version: 2.2.1

environment:
sdk: ">=2.16.0 <3.0.0"
Expand Down