@@ -242,11 +242,8 @@ export abstract class _MatTooltipBase<T extends _TooltipComponentBase> implement
242
242
private readonly _passiveListeners :
243
243
( readonly [ string , EventListenerOrEventListenerObject ] ) [ ] = [ ] ;
244
244
245
- /**
246
- * Reference to the current document.
247
- * @breaking -change 11.0.0 Remove `| null` typing for `document`.
248
- */
249
- private _document : Document | null ;
245
+ /** Reference to the current document. */
246
+ private _document : Document ;
250
247
251
248
/** Timer started at the last `touchstart` event. */
252
249
private _touchstartTimeout : number ;
@@ -266,11 +263,10 @@ export abstract class _MatTooltipBase<T extends _TooltipComponentBase> implement
266
263
scrollStrategy : any ,
267
264
protected _dir : Directionality ,
268
265
private _defaultOptions : MatTooltipDefaultOptions ,
269
-
270
- /** @breaking -change 11.0.0 _document argument to become required. */
271
266
@Inject ( DOCUMENT ) _document : any ) {
272
267
273
268
this . _scrollStrategy = scrollStrategy ;
269
+ this . _document = _document ;
274
270
275
271
if ( _defaultOptions ) {
276
272
if ( _defaultOptions . position ) {
@@ -671,9 +667,7 @@ export abstract class _MatTooltipBase<T extends _TooltipComponentBase> implement
671
667
/** Listener for the `wheel` event on the element. */
672
668
private _wheelListener ( event : WheelEvent ) {
673
669
if ( this . _isTooltipVisible ( ) ) {
674
- // @breaking -change 11.0.0 Remove `|| document` once the document is a required param.
675
- const doc = this . _document || document ;
676
- const elementUnderPointer = doc . elementFromPoint ( event . clientX , event . clientY ) ;
670
+ const elementUnderPointer = this . _document . elementFromPoint ( event . clientX , event . clientY ) ;
677
671
const element = this . _elementRef . nativeElement ;
678
672
679
673
// On non-touch devices we depend on the `mouseleave` event to close the tooltip, but it
@@ -746,8 +740,6 @@ export class MatTooltip extends _MatTooltipBase<TooltipComponent> {
746
740
@Inject ( MAT_TOOLTIP_SCROLL_STRATEGY ) scrollStrategy : any ,
747
741
@Optional ( ) dir : Directionality ,
748
742
@Optional ( ) @Inject ( MAT_TOOLTIP_DEFAULT_OPTIONS ) defaultOptions : MatTooltipDefaultOptions ,
749
-
750
- /** @breaking -change 11.0.0 _document argument to become required. */
751
743
@Inject ( DOCUMENT ) _document : any ) {
752
744
753
745
super ( overlay , elementRef , scrollDispatcher , viewContainerRef , ngZone , platform , ariaDescriber ,
0 commit comments