INIT
This commit is contained in:
+9
@@ -0,0 +1,9 @@
|
||||
/**
|
||||
* Detects the text direction in the element.
|
||||
* @returns {Direction} The text direction ('ltr' for left-to-right or 'rtl' for right-to-left).
|
||||
*/
|
||||
export function getElemDirection(elem) {
|
||||
const style = window.getComputedStyle(elem);
|
||||
const direction = style.getPropertyValue("direction");
|
||||
return direction;
|
||||
}
|
||||
Reference in New Issue
Block a user