File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ import type {ToolbarButton} from './Toolbar.js';
60
60
import { Tooltip } from './Tooltip.js' ;
61
61
import type { TreeOutline } from './Treeoutline.js' ;
62
62
import { Widget } from './Widget.js' ;
63
+ import type { XWidget } from './XWidget.js' ;
63
64
64
65
declare global {
65
66
interface HTMLElementTagNameMap {
@@ -1830,14 +1831,12 @@ function updateWidgetfocusWidgetForNode(node: Node|null): void {
1830
1831
1831
1832
function updateXWidgetfocusWidgetForNode ( node : Node | null ) : void {
1832
1833
node = node ?. parentNodeOrShadowHost ( ) ?? null ;
1833
- const XWidgetCtor = customElements . get ( 'x-widget' ) ;
1834
+ const XWidgetConstructor = customElements . get ( 'x-widget' ) as Platform . Constructor . Constructor < XWidget > | undefined ;
1834
1835
let widget = null ;
1835
1836
while ( node ) {
1836
- if ( XWidgetCtor && node instanceof XWidgetCtor ) {
1837
+ if ( XWidgetConstructor && node instanceof XWidgetConstructor ) {
1837
1838
if ( widget ) {
1838
- // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration
1839
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1840
- ( node as any ) . defaultFocusedElement = widget ;
1839
+ node . defaultFocusedElement = widget ;
1841
1840
}
1842
1841
widget = node ;
1843
1842
}
Original file line number Diff line number Diff line change @@ -13,8 +13,7 @@ const storedScrollPositions = new WeakMap<Element, {
13
13
14
14
export class XWidget extends XElement {
15
15
private visible : boolean ;
16
- private readonly shadowRootInternal ! : DocumentFragment | null ;
17
- private defaultFocusedElement : Element | null ;
16
+ defaultFocusedElement : Element | null ;
18
17
private elementsToRestoreScrollPositionsFor : Element [ ] ;
19
18
private onShownCallback ! : ( ( ) => void ) | null ;
20
19
private onHiddenCallback ! : ( ( ) => void ) | null ;
You can’t perform that action at this time.
0 commit comments