File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -309,7 +309,7 @@ pub trait BaseAudioContext {
309
309
fn set_onstatechange < F : FnMut ( Event ) + Send + ' static > ( & self , mut callback : F ) {
310
310
let callback = move |_| {
311
311
callback ( Event {
312
- type_ : "onstatechange " ,
312
+ type_ : "statechange " ,
313
313
} )
314
314
} ;
315
315
@@ -319,6 +319,10 @@ pub trait BaseAudioContext {
319
319
) ;
320
320
}
321
321
322
+ fn clear_onstatechange ( & self ) {
323
+ self . base ( ) . clear_event_handler ( EventType :: StateChange ) ;
324
+ }
325
+
322
326
#[ cfg( test) ]
323
327
fn mock_registration ( & self ) -> AudioContextRegistration {
324
328
AudioContextRegistration {
Original file line number Diff line number Diff line change @@ -329,7 +329,7 @@ impl AudioContext {
329
329
pub fn set_onsinkchange < F : FnMut ( Event ) + Send + ' static > ( & self , mut callback : F ) {
330
330
let callback = move |_| {
331
331
callback ( Event {
332
- type_ : "onsinkchange " ,
332
+ type_ : "sinkchange " ,
333
333
} )
334
334
} ;
335
335
You can’t perform that action at this time.
0 commit comments