html5/spec Overview.html,1.4556,1.4557

Update of /sources/public/html5/spec
In directory hutz:/tmp/cvs-serv17822

Modified Files:
	Overview.html 
Log Message:
Add a new example for alert()'s bidi implications (whatwg r5689)

Index: Overview.html
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.4556
retrieving revision 1.4557
diff -u -d -r1.4556 -r1.4557
--- Overview.html	30 Nov 2010 20:51:42 -0000	1.4556
+++ Overview.html	30 Nov 2010 21:21:51 -0000	1.4557
@@ -65417,26 +65417,39 @@
 
   <div class="example">
 
-    <p>For example, consider the following script:</p>
+   <p>Thus, the following script:</p>
 
-    <pre>var s;
+   <pre>alert('\u05DC\u05DE\u05D3 HTML \u05D4\u05D9\u05D5\u05DD!')</pre>
+
+   <p>...would always result in a message reading
+        "<bdo dir="rtl" lang="" title="">&#1500;&#1502;&#1491;&nbsp;LMTH&nbsp;&#1492;&#1497;&#1493;&#1501;!</bdo>"
+   (not "<bdo dir="ltr" lang="" title="">&#1491;&#1502;&#1500;&nbsp;HTML&nbsp;&#1501;&#1493;&#1497;&#1492;!</bdo>"),
+   regardless of the language of the user agent interface or the
+   direction of the page or any of its elements.</p>
+
+  </div>
+
+  <div class="example">
+
+   <p>For a more complex example, consider the following script:</p>
+
+   <pre>var s;
 if (s = prompt('What is your name?')) {
   alert(s + '! Ok, Fred, ' + s + ', and Wilma will get the car.');
 }</pre>
 
-    <p>When the user enters "<kbd>Kitty</kbd>", the user agent would
-    alert "<samp>Kitty! Ok, Fred, Kitty, and Wilma will get the
-    car.</samp>". However, if the user enters "<kbd dir="rtl" lang="ar">&#1604;&#1575;&nbsp;&#1571;&#1601;&#1607;&#1605;</kbd>",
-    then the bidirectional algorithm will determine that the direction
-    of the paragraph is right-to-left, and so the output will be
-    "<samp lang=""><bdo dir="rtl">&#1604;&#1575;&nbsp;&#1571;&#1601;&#1607;&#1605;!&nbsp;derF&nbsp;,kO,&nbsp;&#1604;&#1575;&nbsp;&#1571;&#1601;&#1607;&#1605;,&nbsp;rac&nbsp;eht&nbsp;teg&nbsp;lliw&nbsp;amliW&nbsp;dna.</bdo></samp>"!</p>
-
-    <p>Authors can enforce a particular interpretation by using the
-    Unicode U+200E LEFT-TO-RIGHT MARK and U+200F RIGHT-TO-LEFT MARK
-    characters.</p>
+   <p>When the user enters "<kbd>Kitty</kbd>", the user agent would
+   alert "<samp>Kitty! Ok, Fred, Kitty, and Wilma will get the
+   car.</samp>". However, if the user enters "<kbd dir="rtl" lang="ar">&#1604;&#1575;&nbsp;&#1571;&#1601;&#1607;&#1605;</kbd>",
+   then the bidirectional algorithm will determine that the direction
+   of the paragraph is right-to-left, and so the output will be "<samp lang=""><bdo dir="rtl">&#1604;&#1575;&nbsp;&#1571;&#1601;&#1607;&#1605;!&nbsp;derF&nbsp;,kO,&nbsp;&#1604;&#1575;&nbsp;&#1571;&#1601;&#1607;&#1605;,&nbsp;rac&nbsp;eht&nbsp;teg&nbsp;lliw&nbsp;amliW&nbsp;dna.</bdo></samp>"!</p>
 
   </div>
 
+  <p>When necessary, authors can enforce a particular direction for a
+  given paragraph by starting it with the Unicode U+200E LEFT-TO-RIGHT
+  MARK or U+200F RIGHT-TO-LEFT MARK characters.</p>
+
 
 
   <h3 id="print-media"><span class="secno">10.7 </span>Print media</h3>

Received on Tuesday, 30 November 2010 21:21:59 UTC