W3C home > Mailing lists > Public > public-script-coord@w3.org > January to March 2013

Re: E4H and constructing DOMs

From: Ian Hickson <ian@hixie.ch>
Date: Thu, 7 Mar 2013 18:43:07 +0000 (UTC)
To: Allen Wirfs-Brock <allen@wirfs-brock.com>
cc: Rick Waldron <waldron.rick@gmail.com>, Ojan Vafai <ojan@chromium.org>, Adam Barth <abarth@chromium.org>, "rafaelw@chromium.org" <rafaelw@chromium.org>, Adam Klein <adamk@chromium.org>, Anne van Kesteren <annevk@annevk.nl>, Alex Russell <slightlyoff@chromium.org>, "public-script-coord@w3.org" <public-script-coord@w3.org>
Message-ID: <Pine.LNX.4.64.1303071834510.15713@ps20323.dreamhostps.com>
On Thu, 7 Mar 2013, Allen Wirfs-Brock wrote:
> 
> There is no reason an implementation (or a platform standard) couldn't 
> define a well known tag function that processes a well specified syntax 
> (eg, HTML)
> 
>    HTML`<label><input type="checkbox" name={name}
>               checked?={checked} disabled?={!enabled}/> {label}</label>`
> 
> such that a JS implementation could recognize the tag usage at 
> compile-time and statically check the syntax of the statically provided 
> portions of template strings that use that tag.  Alternatively, a 
> lint-like processor could could recognize such tags and produce 
> diagnostics for them.

If this:

   <script>
     alert('test');
     HTML`<a></b>`
   </script>

...would sometimes alert "test" and sometimes not, based purely on whether 
the browser defined this well-known tag function, then that's a reason 
why it couldn't happen.

If, on the other hand, you're saying we could require that browsers 
implement such a thing, then that's more interesting. The syntax is not 
quite as clean as E4H's, but maybe it's clean enough that it's ok?

Are there any browsers that have implemented quasis, or that are comitted 
to implementing quasis? If we're to reserve a prefix like this, we should 
do it sooner rather than later, so we don't get forced into particular 
compat constraints.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Thursday, 7 March 2013 18:43:31 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:09 UTC