@@ -101,26 +101,26 @@ export class EnhancerRegistry {
101101
102102export class TextareaRegistry {
103103 private textareas = new Map < HTMLTextAreaElement , EnhancedTextarea > ( )
104- private onEnhanced ?: ( spot : CommentSpot ) => void
105- private onDestroyed ?: ( spot : CommentSpot ) => void
104+ private onEnhanced ?: ( textareaInfo : EnhancedTextarea ) => void
105+ private onDestroyed ?: ( textareaInfo : EnhancedTextarea ) => void
106106
107107 setEventHandlers (
108- onEnhanced : ( spot : CommentSpot ) => void ,
109- onDestroyed : ( spot : CommentSpot ) => void ,
108+ onEnhanced : ( textareaInfo : EnhancedTextarea ) => void ,
109+ onDestroyed : ( textareaInfo : EnhancedTextarea ) => void ,
110110 ) : void {
111111 this . onEnhanced = onEnhanced
112112 this . onDestroyed = onDestroyed
113113 }
114114
115115 register < T extends CommentSpot > ( textareaInfo : EnhancedTextarea < T > ) : void {
116116 this . textareas . set ( textareaInfo . textarea , textareaInfo )
117- this . onEnhanced ?.( textareaInfo . spot )
117+ this . onEnhanced ?.( textareaInfo )
118118 }
119119
120120 unregisterDueToModification ( textarea : HTMLTextAreaElement ) : void {
121121 const textareaInfo = this . textareas . get ( textarea )
122122 if ( textareaInfo ) {
123- this . onDestroyed ?.( textareaInfo . spot )
123+ this . onDestroyed ?.( textareaInfo )
124124 this . textareas . delete ( textarea )
125125 }
126126 }
0 commit comments