1 | {"version":3,"file":"initializeDir.js","sourceRoot":"../src/","sources":["initializeDir.ts"],"names":[],"mappings":";;AAAA,6CAA4C;AAE5C,SAAgB,aAAa,CAAC,GAAY;IACxC,IAAM,CAAC,GAAG,CAAC,GAAG,IAAI,qBAAS,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;AAbD,sCAaC","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"]} |