@@ -10,6 +10,7 @@ import {
10
10
ChangeDetectionStrategy ,
11
11
Component ,
12
12
Injectable ,
13
+ ListenerOptions ,
13
14
NgZone ,
14
15
OnDestroy ,
15
16
RendererFactory2 ,
@@ -19,7 +20,6 @@ import {
19
20
signal ,
20
21
} from '@angular/core' ;
21
22
import { DOCUMENT } from '@angular/common' ;
22
- import { _bindEventWithOptions , _ListenerOptions } from '../platform' ;
23
23
import { _CdkPrivateStyleLoader } from '../private' ;
24
24
import { Observable , Observer , Subject , merge } from 'rxjs' ;
25
25
import type { DropListRef } from './drop-list-ref' ;
@@ -123,8 +123,7 @@ export class DragDropRegistry implements OnDestroy {
123
123
// The event handler has to be explicitly active,
124
124
// because newer browsers make it passive by default.
125
125
this . _cleanupDocumentTouchmove ?.( ) ;
126
- this . _cleanupDocumentTouchmove = _bindEventWithOptions (
127
- this . _renderer ,
126
+ this . _cleanupDocumentTouchmove = this . _renderer . listen (
128
127
this . _document ,
129
128
'touchmove' ,
130
129
this . _persistentTouchmoveListener ,
@@ -170,7 +169,7 @@ export class DragDropRegistry implements OnDestroy {
170
169
const isTouchEvent = event . type . startsWith ( 'touch' ) ;
171
170
const endEventHandler = ( e : Event ) => this . pointerUp . next ( e as TouchEvent | MouseEvent ) ;
172
171
173
- const toBind : [ name : string , handler : ( event : Event ) => void , options : _ListenerOptions ] [ ] = [
172
+ const toBind : [ name : string , handler : ( event : Event ) => void , options : ListenerOptions ] [ ] = [
174
173
// Use capturing so that we pick up scroll changes in any scrollable nodes that aren't
175
174
// the document. See https://github.com/angular/components/issues/17144.
176
175
[ 'scroll' , ( e : Event ) => this . _scroll . next ( e ) , capturingEventOptions ] ,
@@ -203,7 +202,7 @@ export class DragDropRegistry implements OnDestroy {
203
202
204
203
this . _ngZone . runOutsideAngular ( ( ) => {
205
204
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 ) ,
207
206
) ;
208
207
} ) ;
209
208
}
@@ -247,8 +246,7 @@ export class DragDropRegistry implements OnDestroy {
247
246
streams . push (
248
247
new Observable ( ( observer : Observer < Event > ) => {
249
248
return this . _ngZone . runOutsideAngular ( ( ) => {
250
- const cleanup = _bindEventWithOptions (
251
- this . _renderer ,
249
+ const cleanup = this . _renderer . listen (
252
250
shadowRoot as ShadowRoot ,
253
251
'scroll' ,
254
252
( event : Event ) => {
0 commit comments