Re: font-family-rule-005 pass condition is incorrect

On 15/10/10 22:00, L. David Baron wrote:
> http://test.csswg.org/suites/css2.1/20101001/html4/font-family-rule-005.htm
> says:
>    Test passes if there is the word "PASS" below.
>
> It should also allow there to be an unknown-character glyph.

It's also invalid in XHTML as it relies upon document.write() (as well 
as Element.innerHTML which doesn't have wide support in XHTML). It would 
be better to rewrite the script to something like:

var pass = document.getElementById("test").textContent.charCodeAt(0) === 
127;
document.body.appendChild(document.createTextNode(pass ? "PASS" : "FAIL"));

-- 
Geoffrey Sneddon — Opera Software
<http://gsnedders.com>
<http://opera.com>

Received on Saturday, 16 October 2010 19:24:34 UTC