- From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
- Date: Tue, 30 Nov 2010 21:21:56 +0000
- To: public-html-commits@w3.org
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="">למד LMTH היום!</bdo>"
+ (not "<bdo dir="ltr" lang="" title="">דמל HTML םויה!</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">لا أفهم</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">لا أفهم! derF ,kO, لا أفهم, rac eht teg lliw amliW 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">لا أفهم</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">لا أفهم! derF ,kO, لا أفهم, rac eht teg lliw amliW 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