Skip to content

Commit

Permalink
feat(overlay): expose reference to the backdrop element (#9702)
Browse files Browse the repository at this point in the history
Exposes a reference to the backdrop element via the `OverlayRef` for convenience/customization.

Fixes #9689.
  • Loading branch information
crisbeto authored and tinayuangao committed Feb 1, 2018
1 parent 8997db0 commit 959a8a1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/cdk/overlay/overlay-ref.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ export class OverlayRef implements PortalOutlet {
return this._pane;
}

/** The overlay's backdrop HTML element. */
get backdropElement(): HTMLElement | null {
return this._backdropElement;
}

attach<T>(portal: ComponentPortal<T>): ComponentRef<T>;
attach<T>(portal: TemplatePortal<T>): EmbeddedViewRef<T>;
attach(portal: any): any;
Expand Down

0 comments on commit 959a8a1

Please sign in to comment.