diff --git a/src/google-maps/map-info-window/map-info-window.ts b/src/google-maps/map-info-window/map-info-window.ts index 407c9f3d3fe0..e54261dcb502 100644 --- a/src/google-maps/map-info-window/map-info-window.ts +++ b/src/google-maps/map-info-window/map-info-window.ts @@ -32,7 +32,6 @@ import {MapAnchorPoint} from '../map-anchor-point'; @Directive({ selector: 'map-info-window', exportAs: 'mapInfoWindow', - host: {'style': 'display: none'}, }) export class MapInfoWindow implements OnInit, OnDestroy { private readonly _googleMap = inject(GoogleMap); @@ -104,6 +103,11 @@ export class MapInfoWindow implements OnInit, OnDestroy { @Output() readonly infoWindowInitialized: EventEmitter = new EventEmitter(); + constructor() { + // Set through CSSOM rather than a host style attribute so it isn't blocked by a strict CSP `style-src`. + this._elementRef.nativeElement.style.display = 'none'; + } + ngOnInit() { if (this._googleMap._isBrowser) { this._combineOptions()