fix(ivy): adding event listeners for global objects (window, document, body) (#27772)
This update introduces support for global object (window, document, body) listeners, that can be defined via host listeners on Components and Directives. PR Close #27772
This commit is contained in:

committed by
Kara Erickson

parent
917c09cfc8
commit
6e7c46af1b
@ -446,7 +446,11 @@ export interface TView {
|
||||
*
|
||||
* If it's a native DOM listener or output subscription being stored:
|
||||
* 1st index is: event name `name = tView.cleanup[i+0]`
|
||||
* 2nd index is: index of native element `element = lView[tView.cleanup[i+1]]`
|
||||
* 2nd index is: index of native element or a function that retrieves global target (window,
|
||||
* document or body) reference based on the native element:
|
||||
* `typeof idxOrTargetGetter === 'function'`: global target getter function
|
||||
* `typeof idxOrTargetGetter === 'number'`: index of native element
|
||||
*
|
||||
* 3rd index is: index of listener function `listener = lView[CLEANUP][tView.cleanup[i+2]]`
|
||||
* 4th index is: `useCaptureOrIndx = tView.cleanup[i+3]`
|
||||
* `typeof useCaptureOrIndx == 'boolean' : useCapture boolean
|
||||
|
Reference in New Issue
Block a user