| 1 |
wakaba |
1.1 |
<!DOCTYPE HTML> |
| 2 |
|
|
<html> |
| 3 |
|
|
<head> |
| 4 |
|
|
<title>White Space Characters in CSS Style Sheet</title> |
| 5 |
|
|
<style> |
| 6 |
|
|
</style> |
| 7 |
|
|
</head> |
| 8 |
|
|
<body> |
| 9 |
|
|
|
| 10 |
|
|
<p>This test is for IE. For other browsers, use |
| 11 |
|
|
<a href=space-char-2>space-char-2</a>.</p> |
| 12 |
|
|
|
| 13 |
|
|
<p id=test>Script is not executed yet.</p> |
| 14 |
|
|
|
| 15 |
|
|
<ul id=result-list></ul> |
| 16 |
|
|
|
| 17 |
|
|
<script> |
| 18 |
|
|
var test = document.getElementById ('test'); |
| 19 |
|
|
var style = document.getElementsByTagName ('style')[0]; |
| 20 |
|
|
var results = document.getElementById ('result-list'); |
| 21 |
|
|
|
| 22 |
|
|
test.innerText = 'Testing BMP...'; |
| 23 |
|
|
|
| 24 |
|
|
for (var i = 0; i < 0x10000; i++) { |
| 25 |
|
|
var ss = 'p { color: ' + String.fromCharCode (i) + ' red}'; |
| 26 |
|
|
style.styleSheet.cssText = ss; |
| 27 |
|
|
if (test.currentStyle.color == 'red') { |
| 28 |
|
|
results.appendChild (document.createElement ('li')) |
| 29 |
|
|
.innerText = i.toString (16).toUpperCase (); |
| 30 |
|
|
} |
| 31 |
|
|
} |
| 32 |
|
|
|
| 33 |
|
|
for (var i = 0xD800; i < 0xDC00; i++) { |
| 34 |
|
|
test.innerText = 'Testing surrogate 0x' + i.toString (16) + '...'; |
| 35 |
|
|
|
| 36 |
|
|
for (var j = 0xDC00; j < 0xE000; j++) { |
| 37 |
|
|
var ss = 'p { color: ' + String.fromCharCode (i) + |
| 38 |
|
|
String.fromCharCode (j) + ' red}'; |
| 39 |
|
|
style.styleSheet.cssText = ss; |
| 40 |
|
|
if (test.currentStyle.color == 'red') { |
| 41 |
|
|
results.appendChild (document.createElement ('li')) |
| 42 |
|
|
.innerText = i.toString (16).toUpperCase () + ', ' + |
| 43 |
|
|
j.toString (16).toUpperCase (); |
| 44 |
|
|
} |
| 45 |
|
|
} |
| 46 |
|
|
} |
| 47 |
|
|
|
| 48 |
|
|
test.innerText = 'Done.'; |
| 49 |
|
|
</script> |
| 50 |
|
|
|
| 51 |
|
|
</body> |
| 52 |
|
|
</html> |