@@ -10,6 +10,7 @@ import {
1010 ChangeDetectionStrategy ,
1111 Component ,
1212 Injectable ,
13+ ListenerOptions ,
1314 NgZone ,
1415 OnDestroy ,
1516 RendererFactory2 ,
@@ -19,7 +20,6 @@ import {
1920 signal ,
2021} from '@angular/core' ;
2122import { DOCUMENT } from '@angular/common' ;
22- import { _bindEventWithOptions , _ListenerOptions } from '../platform' ;
2323import { _CdkPrivateStyleLoader } from '../private' ;
2424import { Observable , Observer , Subject , merge } from 'rxjs' ;
2525import type { DropListRef } from './drop-list-ref' ;
@@ -123,8 +123,7 @@ export class DragDropRegistry implements OnDestroy {
123123 // The event handler has to be explicitly active,
124124 // because newer browsers make it passive by default.
125125 this . _cleanupDocumentTouchmove ?.( ) ;
126- this . _cleanupDocumentTouchmove = _bindEventWithOptions (
127- this . _renderer ,
126+ this . _cleanupDocumentTouchmove = this . _renderer . listen (
128127 this . _document ,
129128 'touchmove' ,
130129 this . _persistentTouchmoveListener ,
@@ -170,7 +169,7 @@ export class DragDropRegistry implements OnDestroy {
170169 const isTouchEvent = event . type . startsWith ( 'touch' ) ;
171170 const endEventHandler = ( e : Event ) => this . pointerUp . next ( e as TouchEvent | MouseEvent ) ;
172171
173- const toBind : [ name : string , handler : ( event : Event ) => void , options : _ListenerOptions ] [ ] = [
172+ const toBind : [ name : string , handler : ( event : Event ) => void , options : ListenerOptions ] [ ] = [
174173 // Use capturing so that we pick up scroll changes in any scrollable nodes that aren't
175174 // the document. See https://github.com/angular/components/issues/17144.
176175 [ 'scroll' , ( e : Event ) => this . _scroll . next ( e ) , capturingEventOptions ] ,
@@ -203,7 +202,7 @@ export class DragDropRegistry implements OnDestroy {
203202
204203 this . _ngZone . runOutsideAngular ( ( ) => {
205204 this . _globalListeners = toBind . map ( ( [ name , handler , options ] ) =>
206- _bindEventWithOptions ( this . _renderer , this . _document , name , handler , options ) ,
205+ this . _renderer . listen ( this . _document , name , handler , options ) ,
207206 ) ;
208207 } ) ;
209208 }
@@ -247,8 +246,7 @@ export class DragDropRegistry implements OnDestroy {
247246 streams . push (
248247 new Observable ( ( observer : Observer < Event > ) => {
249248 return this . _ngZone . runOutsideAngular ( ( ) => {
250- const cleanup = _bindEventWithOptions (
251- this . _renderer ,
249+ const cleanup = this . _renderer . listen (
252250 shadowRoot as ShadowRoot ,
253251 'scroll' ,
254252 ( event : Event ) => {
0 commit comments