3 <script type="text/javascript">
\r
5 function selectAndJustify()
\r
7 if (window.layoutTestController)
\r
8 layoutTestController.dumpAsText();
\r
10 var elem = document.getElementById("test");
\r
11 var selection = window.getSelection();
\r
12 selection.setBaseAndExtent(elem, 2, elem, 6);
\r
13 document.execCommand('JustifyCenter', false, null);
\r
20 <span id="test" contenteditable="true" >
\r
23 <b>Select all text in this line and use justify command.</b>
\r