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

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

From: Ian Hickson <ian@hixie.ch>
Date: Fri, 15 Jun 2012 22:19:33 +0000 (UTC)
To: whatwg <whatwg@whatwg.org>
Message-ID: <Pine.LNX.4.64.1206152216170.30734@ps20323.dreamhostps.com>
On Sun, 13 May 2012, Benjamin Hawkes-Lewis wrote:
> On Sun, May 13, 2012 at 1:47 AM, Brett Zamir <brettz9@yahoo.com> wrote:
> > With Server-Side JavaScript taking off, could we reserve "runat" (or 
> > maybe an even simpler and more concise "server" boolean attribute) for 
> > a standard and (via CommonJS) potentially portable way for server-side 
> > files to be created (and discourage use of HTML-unfriendly and 
> > syntax-highlighter-unaware processing instructions)?
> "server-side files to be created" - what do you mean?
> What would this attribute do?

On Sun, 13 May 2012, Brett Zamir wrote:
> So, no matter the Server-side JavaScript engine, one could write code 
> like tihs:
> <p>You loaded this page on <script server> print(new Date()); </server></p>
> which would become:
> <p>You loaded this page on Sun May 13 2012 22:33:28 GMT+0800 (China 
> Standard Time)</p>
> > What would this attribute do?
> It would simply be reserved for server-side consumption, whether such 
> applications would replace the contents of the tag with HTML or perform 
> some non-transparent actions and just remove the tag. It would not do 
> anything on the client-side (though it wouldn't need to restrict the 
> default behavior either since it really should be consumed by the time 
> it reaches browsers). The purpose is simply to allow server-side 
> applications (such as within templates) to be able to use one HTML 
> syntax portably across other server-side HTML+JavaScript generating 
> environments (and also not be concerned that, as with data-* attributes, 
> that there might end up being some other future use of the attribute by 
> client-side HTML).

We don't have to modify the HTML spec to do this. Since it would be an 
extension to HTML for server-specific use, all that needs to happen is for 
the server implementors who are interested in doing this to get together 
and define an attribute which they then go and support.

Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Friday, 15 June 2012 22:20:05 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:43 UTC