body {width: 600px;}
div {border: 1px solid gray; margin: 1em;}
</style>
<script src="dir-shadow-utils.js"></script>
</head>
<body>

<p>`dir=ltr` on the shadow host, paragraph in the shadow tree</p>
<div id="host" dir="ltr"></div>
<p id="result">The HTML direction / computed CSS `direction` value for the paragraph is: </p>

<script type="text/javascript">
  let root = host.attachShadow({mode:"open"});
  root.innerHTML = `<style>p {width: 50%; border: 1px dotted;}</style><p>اختبر.</p>`;
  result.innerHT