@@ -4,20 +4,22 @@ import {
44 type ReactiveControllerHost ,
55} from 'lit' ;
66
7- function isARIAMixinProp ( key : string ) : key is keyof ARIAMixin {
8- return key === 'role' || key . startsWith ( 'aria' ) ;
9- }
10-
117type FACE = HTMLElement & {
128 formDisabledCallback ?( disabled : boolean ) : void ;
139} ;
1410
11+ interface InternalsControllerOptions extends Partial < ARIAMixin > {
12+ getHTMLElement ?( ) : HTMLElement ;
13+ }
14+
1515const protos = new WeakMap ( ) ;
1616
1717let constructingAllowed = false ;
1818
19- interface InternalsControllerOptions extends Partial < ARIAMixin > {
20- getHTMLElement ?( ) : HTMLElement ;
19+ globalThis . _elementInternals ??= new WeakMap < Element , ElementInternals > ( ) ;
20+
21+ function isARIAMixinProp ( key : string ) : key is keyof ARIAMixin {
22+ return key === 'role' || key . startsWith ( 'aria' ) ;
2123}
2224
2325/**
@@ -264,7 +266,6 @@ export class InternalsController implements ReactiveController, ARIAMixin {
264266 InternalsController . instances . set ( host , this ) ;
265267 this . #polyfillDisabledPseudo( ) ;
266268 // Expose internals to aXe Core
267- globalThis . _elementInternals ??= new WeakMap < Element , ElementInternals > ( ) ;
268269 globalThis . _elementInternals . set ( this . host , this . internals ) ;
269270 }
270271
0 commit comments