W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2012

Re: [whatwg] runat (or "server") attribute

From: Odin Hørthe Omdal <odinho@opera.com>
Date: Sun, 13 May 2012 17:45:46 +0000
To: ash@ashleysheridan.co.uk, "Anne van Kesteren" <annevk@annevk.nl>
Message-ID: <be81780fee30f98ab5297ec6acf7e07b@opera.com>
Cc: whatwg <whatwg@whatwg.org>, Benjamin Hawkes-Lewis <bhawkeslewis@googlemail.com>, Brett Zamir <brettz9@yahoo.com>
>> Just use type="text/server-js"...
> Is that really a good idea? It seems odd to use a mime type for such a
> reason.

I thought it was quite a nice idea.

Why would it not be? It's describing what's in the script tag, just like it's supposed to do. It's even a quite much used pattern for doing client side templates <script type="text/template"> on the web today.

Mime types are not magical any more. Before we could make our own text/x-whatever, but prefixes are not really any use. If you want something specific to your program you could always use something specific as prefix, -- but for this use case just doing  text/server-js  seems rather nice :-)

--
Odin Hørthe Omdal (odinho, Velmont)
Received on Sunday, 13 May 2012 17:46:26 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:08 GMT