Re: New elements vs. Trident

On Sep 17, 2007, at 2:31 AM, Robert Burns wrote:

> This works for me in Safari 3.0 beta with uppercase: i.e.,
> "test('document.getElementsByTagName("HTML:FIGURE").length');"
>
> Even though we're using namespaces, the HTML rules still apply to  
> capitalization.

I don't know what I was thinking there, it's got nothing to do with  
case. I thought I had tested it with "html5:figure", but apparently   
I hadn't.

But yes, the tagname would be treated as html5:figure in pre-HTML5  
UAs (except for IE). That to me is an excellent example of graceful  
degradation.

That would mean that HTML5 would define two names for the new figure  
element: "figure" and "html5:figure" and also provide a canonical  
prefix for use in text/html serializations. Like "xmlns" and "xml",  
"html5" (or "html") would always point to the same namespace (even  
without a binding/declaration). Converting to an XML serialization  
would mean removing the htmll prefix from elements and altering CSS  
and Javascript accordingly. Again, I'm not suggesting this graceful  
degradation should outweigh all other concerns, but like any design  
principle this example illustrates how it might be used when it does  
outweigh other principles.

Also on the issue of scripting, I thought an important part of the  
graceful degradation design principle was to avoid scripting (and  
even CSS, though I think that's too restrictive). Once we add  
scripting we can accomplish pretty much anything and call it graceful  
degradation. In other words it empties the design principle of all of  
its meaning. That may mean the only examples of graceful degradation  
will have to draw on new features for HTML5 that do not involve new  
element names (new attributes or other syntax changes would be useful).

Just to throw out an example: what would happen if we added the self- 
closing syntax to text/html and actually made it meaningful.  
Presumably this would degrade gracefully since existing content would  
not end their opening element tags with a "/>".  Just a thought for  
another example.

Take care,
Rob

Received on Monday, 17 September 2007 07:56:16 UTC