@@ -23,39 +23,36 @@ interface RuffleTest {
2323}
2424
2525declare global {
26- // eslint-disable-next-line @typescript-eslint/no-namespace
27- namespace WebdriverIO {
28- interface Element {
29- // ExternalInterface makes whatever functions exist "magically" - so let's just declare here for type's sake
26+ interface HTMLElement {
27+ // ExternalInterface makes whatever functions exist "magically" - so let's just declare here for type's sake
3028
31- // Logs all arguments to trace
32- log : ( ...args : unknown [ ] ) => void ;
29+ // Logs all arguments to trace
30+ log : ( ...args : unknown [ ] ) => void ;
3331
34- // Calls `ExternalInterface.call(name, ...args)` after a delay (to avoid reentrancy)
35- callMethodWithDelay : ( name : string , ...args : unknown [ ] ) => void ;
32+ // Calls `ExternalInterface.call(name, ...args)` after a delay (to avoid reentrancy)
33+ callMethodWithDelay : ( name : string , ...args : unknown [ ] ) => void ;
3634
37- // Calls `ExternalInterface.call(name, ...args)` immediately (causing reentrancy)
38- callMethodImmediately : ( name : string , ...args : unknown [ ] ) => void ;
35+ // Calls `ExternalInterface.call(name, ...args)` immediately (causing reentrancy)
36+ callMethodImmediately : ( name : string , ...args : unknown [ ] ) => void ;
3937
40- // Returns `value`
41- returnAValue : < T > ( value : T ) => T ;
38+ // Returns `value`
39+ returnAValue : < T > ( value : T ) => T ;
4240
43- // Should return an exception...
44- throwAnException : ( ) => void ;
41+ // Should return an exception...
42+ throwAnException : ( ) => void ;
4543
46- // Calls `ExternalInterface.marshallExceptions = value`
47- setMarshallExceptions : ( value : boolean ) => void ;
44+ // Calls `ExternalInterface.marshallExceptions = value`
45+ setMarshallExceptions : ( value : boolean ) => void ;
4846
49- // Calls `ExternalInterface.addCallback(name, function() { return returnValue; })`
50- addAnotherCallback : ( name : string , returnValue : unknown ) => void ;
47+ // Calls `ExternalInterface.addCallback(name, function() { return returnValue; })`
48+ addAnotherCallback : ( name : string , returnValue : unknown ) => void ;
5149
52- // Going to be redefined as part of a test
53- redefinedMethod : ( ) => string ;
50+ // Going to be redefined as part of a test
51+ redefinedMethod : ( ) => string ;
5452
55- ruffle < V extends keyof Player . APIVersions = 1 > (
56- version ?: V ,
57- ) : Player . APIVersions [ V ] ;
58- }
53+ ruffle < V extends keyof Player . APIVersions = 1 > (
54+ version ?: V ,
55+ ) : Player . APIVersions [ V ] ;
5956 }
6057
6158 interface Window {
@@ -102,11 +99,9 @@ ExternalInterface.objectID: "flash_name"
10299 return called ;
103100 } ,
104101 log : function ( ...args : any [ ] ) {
105- (
106- document . getElementById (
107- "flash_id" ,
108- ) as unknown as WebdriverIO . Element
109- ) . log ( ...args ) ;
102+ ( document . getElementById ( "flash_id" ) as HTMLElement ) . log (
103+ ...args ,
104+ ) ;
110105 } ,
111106 } ;
112107 } ) ;
0 commit comments