1- using KristofferStrube . Blazor . WebIDL ;
1+ using KristofferStrube . Blazor . DOM ;
2+ using KristofferStrube . Blazor . DOM . Extensions ;
3+ using KristofferStrube . Blazor . WebIDL ;
24using Microsoft . JSInterop ;
35using System . Text . Json . Serialization ;
46
@@ -8,7 +10,7 @@ namespace KristofferStrube.Blazor.FileAPI;
810/// <see href="https://www.w3.org/TR/FileAPI/#dfn-filereader">FileReader browser specs</see>
911/// </summary>
1012[ IJSWrapperConverter ]
11- public class FileReaderInProcess : FileReader , IJSInProcessCreatable < FileReaderInProcess , FileReader >
13+ public class FileReaderInProcess : FileReader , IJSInProcessCreatable < FileReaderInProcess , FileReader > , IEventTargetInProcess
1214{
1315 /// <inheritdoc/>
1416 public new IJSInProcessObjectReference JSReference { get ; set ; }
@@ -240,6 +242,40 @@ public void InvokeOnLoadEnd(IJSInProcessObjectReference jsProgressEvent)
240242 OnLoadEnd . Invoke ( new ProgressEventInProcess ( JSRuntime , InProcessHelper , jsProgressEvent , new ( ) { DisposesJSReference = true } ) ) ;
241243 }
242244
245+ /// <inheritdoc/>
246+ public void AddEventListener < TInProcessEvent , TEvent > ( string type , EventListenerInProcess < TInProcessEvent , TEvent > ? callback , AddEventListenerOptions ? options = null )
247+ where TEvent : Event , IJSCreatable < TEvent > where TInProcessEvent : IJSInProcessCreatable < TInProcessEvent , TEvent >
248+ {
249+ this . AddEventListener ( InProcessHelper , type , callback , options ) ;
250+ }
251+
252+ /// <inheritdoc/>
253+ public void AddEventListener < TInProcessEvent , TEvent > ( EventListenerInProcess < TInProcessEvent , TEvent > ? callback , AddEventListenerOptions ? options = null )
254+ where TEvent : Event , IJSCreatable < TEvent > where TInProcessEvent : IJSInProcessCreatable < TInProcessEvent , TEvent >
255+ {
256+ this . AddEventListener ( InProcessHelper , callback , options ) ;
257+ }
258+
259+ /// <inheritdoc/>
260+ public void RemoveEventListener < TInProcessEvent , TEvent > ( string type , EventListenerInProcess < TInProcessEvent , TEvent > ? callback , EventListenerOptions ? options = null )
261+ where TEvent : Event , IJSCreatable < TEvent > where TInProcessEvent : IJSInProcessCreatable < TInProcessEvent , TEvent >
262+ {
263+ this . RemoveEventListener ( InProcessHelper , type , callback , options ) ;
264+ }
265+
266+ /// <inheritdoc/>
267+ public void RemoveEventListener < TInProcessEvent , TEvent > ( EventListenerInProcess < TInProcessEvent , TEvent > ? callback , EventListenerOptions ? options = null )
268+ where TEvent : Event , IJSCreatable < TEvent > where TInProcessEvent : IJSInProcessCreatable < TInProcessEvent , TEvent >
269+ {
270+ this . RemoveEventListener ( InProcessHelper , callback , options ) ;
271+ }
272+
273+ /// <inheritdoc/>
274+ public bool DispatchEvent ( Event eventInstance )
275+ {
276+ return IEventTargetInProcessExtensions . DispatchEvent ( this , eventInstance ) ;
277+ }
278+
243279 /// <inheritdoc/>
244280 public new async ValueTask DisposeAsync ( )
245281 {
0 commit comments