|
1 | 1 | <!doctype HTML>
|
2 |
| -<html> |
3 |
| - <meta charset="utf-8"> |
4 |
| - <head> |
5 |
| - <title>HTML5 Canvas Test: The direction attribute inherits from a disconnected canvas element</title> |
6 |
| - <link rel="match" href="canvas.2d.direction-ref.html"/> |
7 |
| - <link rel=" author" href=" mailto:[email protected]" /> |
8 |
| - <link rel="help" |
9 |
| - href="https://html.spec.whatwg.org/multipage/canvas.html#text-styles"/> |
10 |
| - <meta name="assert" content="Verify that a disconnected canvas with no style uses the canvas direction."/> |
11 |
| - <style> |
12 |
| - canvas { |
13 |
| - position: absolute; |
14 |
| - top: 8px; |
15 |
| - left: 8px; |
16 |
| - } |
17 |
| - </style> |
18 |
| - </head> |
19 |
| - <body> |
20 |
| - <canvas id="canvas1" width="300" height="150"> |
21 |
| - Browser does not support HTML5 Canvas. |
22 |
| - </canvas> |
23 |
| - <script type="text/javascript"> |
24 |
| - var canvas = document.createElement("canvas"); |
25 |
| - canvas.setAttribute("dir", "rtl"); |
26 |
| - canvas.setAttribute("width", "300"); |
27 |
| - canvas.setAttribute("height", "150"); |
28 |
| - var ctx = canvas.getContext("2d"); |
| 2 | +<meta charset="utf-8"> |
| 3 | +<title>HTML5 Canvas Test: The direction attribute inherits from a disconnected canvas element</title> |
| 4 | +<link rel="match" href="canvas.2d.direction-ref.html"/> |
| 5 | +<link rel=" author" href=" mailto:[email protected]" /> |
| 6 | +<link rel="help" |
| 7 | + href="https://html.spec.whatwg.org/multipage/canvas.html#text-styles"/> |
| 8 | +<meta name="assert" content="Verify that a disconnected canvas with no style uses the canvas direction."/> |
| 9 | +<style> |
| 10 | + canvas { |
| 11 | + position: absolute; |
| 12 | + top: 8px; |
| 13 | + left: 8px; |
| 14 | + } |
| 15 | +</style> |
| 16 | +<canvas id="canvas1" width="300" height="150"> |
| 17 | + Browser does not support HTML5 Canvas. |
| 18 | +</canvas> |
| 19 | +<script type="text/javascript"> |
| 20 | + var canvas = document.createElement("canvas"); |
| 21 | + canvas.setAttribute("dir", "rtl"); |
| 22 | + canvas.setAttribute("width", "300"); |
| 23 | + canvas.setAttribute("height", "150"); |
| 24 | + var ctx = canvas.getContext("2d"); |
29 | 25 |
|
30 |
| - // The default for direction is inherit |
31 |
| - ctx.font = "25px serif"; |
32 |
| - ctx.fillText("ABC!", 60, 50); |
33 |
| - |
34 |
| - document.body.appendChild(canvas); |
35 |
| - </script> |
36 |
| - </body> |
37 |
| -</html> |
| 26 | + // The default for direction is inherit. |
| 27 | + ctx.font = "25px serif"; |
| 28 | + ctx.fillText("ABC!", 60, 50); |
38 | 29 |
|
| 30 | + document.body.appendChild(canvas); |
| 31 | +</script> |
0 commit comments