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';
6060import { Tooltip } from './Tooltip.js' ;
6161import type { TreeOutline } from './Treeoutline.js' ;
6262import { Widget } from './Widget.js' ;
63+ import type { XWidget } from './XWidget.js' ;
6364
6465declare global {
6566 interface HTMLElementTagNameMap {
@@ -1830,14 +1831,12 @@ function updateWidgetfocusWidgetForNode(node: Node|null): void {
18301831
18311832function updateXWidgetfocusWidgetForNode ( node : Node | null ) : void {
18321833 node = node ?. parentNodeOrShadowHost ( ) ?? null ;
1833- const XWidgetCtor = customElements . get ( 'x-widget' ) ;
1834+ const XWidgetConstructor = customElements . get ( 'x-widget' ) as Platform . Constructor . Constructor < XWidget > | undefined ;
18341835 let widget = null ;
18351836 while ( node ) {
1836- if ( XWidgetCtor && node instanceof XWidgetCtor ) {
1837+ if ( XWidgetConstructor && node instanceof XWidgetConstructor ) {
18371838 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 ;
18411840 }
18421841 widget = node ;
18431842 }
Original file line number Diff line number Diff line change @@ -13,8 +13,7 @@ const storedScrollPositions = new WeakMap<Element, {
1313
1414export class XWidget extends XElement {
1515 private visible : boolean ;
16- private readonly shadowRootInternal ! : DocumentFragment | null ;
17- private defaultFocusedElement : Element | null ;
16+ defaultFocusedElement : Element | null ;
1817 private elementsToRestoreScrollPositionsFor : Element [ ] ;
1918 private onShownCallback ! : ( ( ) => void ) | null ;
2019 private onHiddenCallback ! : ( ( ) => void ) | null ;
You can’t perform that action at this time.
0 commit comments