- From: Josh Sled <jsled@asynchronous.org>
- Date: Fri, 25 May 2007 19:29:24 -0400
- To: public-html@w3.org
Received on Friday, 25 May 2007 23:29:28 UTC
<code> should have a type attribute, which indicates the media type of the inlined content(-fragment). As a use-case, a (hypothetical) javascript library -- say, during body onLoad -- could parse and syntax-hilight [[[ <pre><code type="text/x-python-source"> def foo(): return [x**2 for x in range(10)] </code></pre> ]]] differently from [[[ <pre><code type="application/json"> {'foo': ['bar', 'baz','quux'], 'bar': 42, } </code></pre> ]]] in a blog posting using such code as examples. Extending, user-agents might dispatch to external handlers or formatters based on @type. Also, I note the analog with <object type=...>. -- ...jsled http://asynchronous.org/ - a=jsled; b=asynchronous.org; echo ${a}@${b}
Received on Friday, 25 May 2007 23:29:28 UTC