Skip to content

Commit 959a8a1

Browse files
crisbetotinayuangao
authored andcommitted
feat(overlay): expose reference to the backdrop element (#9702)
Exposes a reference to the backdrop element via the `OverlayRef` for convenience/customization. Fixes #9689.
1 parent 8997db0 commit 959a8a1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/cdk/overlay/overlay-ref.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ export class OverlayRef implements PortalOutlet {
5252
return this._pane;
5353
}
5454

55+
/** The overlay's backdrop HTML element. */
56+
get backdropElement(): HTMLElement | null {
57+
return this._backdropElement;
58+
}
59+
5560
attach<T>(portal: ComponentPortal<T>): ComponentRef<T>;
5661
attach<T>(portal: TemplatePortal<T>): EmbeddedViewRef<T>;
5762
attach(portal: any): any;

0 commit comments

Comments
 (0)