Skip to content

Commit

Permalink
[e] (0) tweak wording and add an example to make things clearer
Browse files Browse the repository at this point in the history
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=10827

git-svn-id: http://svn.whatwg.org/webapps@5678 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Nov 11, 2010
1 parent 4df2354 commit 01f4189
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 10 deletions.
32 changes: 29 additions & 3 deletions complete.html
Expand Up @@ -86848,9 +86848,7 @@ <h4 id=text-rendered-in-native-user-interfaces><span class=secno>14.6.4 </span>T
menus, and tooltips. Text from elements (either attribute values or
the contents of elements) is expected to be rendered in a manner
that honors <a href=#the-directionality>the directionality</a> of the element from
which the text was obtained. Text from scripts (e.g. the argument to
<code title=dom-alert><a href=#dom-alert>window.alert()</a></code>) is expected to be
rendered as a separate bidirectional algorithm paragraph. <a href=#refsBIDI>[BIDI]</a></p>
which the text was obtained.</p>

<div class=example>

Expand Down Expand Up @@ -86881,6 +86879,34 @@ <h4 id=text-rendered-in-native-user-interfaces><span class=secno>14.6.4 </span>T

</div>

<p>A string provided by a script (e.g. the argument to <code title=dom-alert><a href=#dom-alert>window.alert()</a></code>) is expected to be treated
as an independent set of one or more bidirectional algorithm
paragraphs when displayed, as defined by the bidirectional
algorithm, including, for instance, supporting the
paragraph-breaking behaviour of U+000A LINE FEED (LF) characters. <a href=#refsBIDI>[BIDI]</a></p>

<div class=example>

<p>For 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>

</div>



<h3 id=print-media><span class=secno>14.7 </span>Print media</h3>
Expand Down
32 changes: 29 additions & 3 deletions index
Expand Up @@ -82762,9 +82762,7 @@ time[datetime] { binding: <i title="">time</i>; }</pre>
menus, and tooltips. Text from elements (either attribute values or
the contents of elements) is expected to be rendered in a manner
that honors <a href=#the-directionality>the directionality</a> of the element from
which the text was obtained. Text from scripts (e.g. the argument to
<code title=dom-alert><a href=#dom-alert>window.alert()</a></code>) is expected to be
rendered as a separate bidirectional algorithm paragraph. <a href=#refsBIDI>[BIDI]</a></p>
which the text was obtained.</p>

<div class=example>

Expand Down Expand Up @@ -82795,6 +82793,34 @@ time[datetime] { binding: <i title="">time</i>; }</pre>

</div>

<p>A string provided by a script (e.g. the argument to <code title=dom-alert><a href=#dom-alert>window.alert()</a></code>) is expected to be treated
as an independent set of one or more bidirectional algorithm
paragraphs when displayed, as defined by the bidirectional
algorithm, including, for instance, supporting the
paragraph-breaking behaviour of U+000A LINE FEED (LF) characters. <a href=#refsBIDI>[BIDI]</a></p>

<div class=example>

<p>For 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>

</div>



<h3 id=print-media><span class=secno>12.7 </span>Print media</h3>
Expand Down
37 changes: 33 additions & 4 deletions source
Expand Up @@ -99542,10 +99542,7 @@ time[datetime] { binding: <i title="">time</i>; }</pre>
menus, and tooltips. Text from elements (either attribute values or
the contents of elements) is expected to be rendered in a manner
that honors <span>the directionality</span> of the element from
which the text was obtained. Text from scripts (e.g. the argument to
<code title="dom-alert">window.alert()</code>) is expected to be
rendered as a separate bidirectional algorithm paragraph. <a
href="#refsBIDI">[BIDI]</a></p>
which the text was obtained.</p>

<div class="example">

Expand Down Expand Up @@ -99577,6 +99574,38 @@ time[datetime] { binding: <i title="">time</i>; }</pre>

</div>

<p>A string provided by a script (e.g. the argument to <code
title="dom-alert">window.alert()</code>) is expected to be treated
as an independent set of one or more bidirectional algorithm
paragraphs when displayed, as defined by the bidirectional
algorithm, including, for instance, supporting the
paragraph-breaking behaviour of U+000A LINE FEED (LF) characters. <a
href="#refsBIDI">[BIDI]</a></p>

<div class="example">

<p>For 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">&#x644;&#x627;&nbsp;&#x623;&#x641;&#x647;&#x645;</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">&#x644;&#x627;&nbsp;&#x623;&#x641;&#x647;&#x645;!&nbsp;derF&nbsp;,kO,&nbsp;&#x644;&#x627;&nbsp;&#x623;&#x641;&#x647;&#x645;,&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>

</div>



<h3>Print media</h3>
Expand Down

0 comments on commit 01f4189

Please sign in to comment.