1 | {"version":3,"file":"initializeDir.js","sourceRoot":"../src/","sources":["initializeDir.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,UAAU,aAAa,CAAC,GAAY;IACxC,IAAM,CAAC,GAAG,CAAC,GAAG,IAAI,SAAS,EAAE,CAAgD,CAAC;IAE9E,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,qBAAqB,EAAE;QACjC,CAAC,CAAC,qBAAqB,GAAG,IAAI,CAAC;QAE/B,yDAAyD;QACjD,IAAA,4CAAe,CAAgB;QAEvC,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE;YACxC,eAAe,CAAC,YAAY,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;SAC5C;KACF;AACH,CAAC","sourcesContent":["import { getWindow } from './dom/getWindow';\n\nexport function initializeDir(win?: Window): void {\n const w = (win || getWindow()) as Window & { __hasInitializedDir__: boolean };\n\n if (w && !w.__hasInitializedDir__) {\n w.__hasInitializedDir__ = true;\n\n // Ensure that the documentElement has a 'dir' attribute.\n const { documentElement } = w.document;\n\n if (!documentElement.hasAttribute('dir')) {\n documentElement.setAttribute('dir', 'ltr');\n }\n }\n}\n"]} |