blob: a08f304a0c4656f5a02e4731740e54782b257bd1 (
plain)
1
2
3
4
5
6
7
8
9
|
import { getFocusNavController } from '../../../../lib/dist';
export function findSP(): Window {
// old (SP as host)
if (document.title == 'SP') return window;
// new (SP as popup)
return getFocusNavController().m_ActiveContext.m_rgGamepadNavigationTrees.find((x: any) => x.m_ID == 'root_1_').Root
.Element.ownerDocument.defaultView;
}
|