W3C home > Mailing lists > Public > whatwg@whatwg.org > February 2011

[whatwg] Thoughts on recent WhatWG blog post

From: Diogo Resende <dresende@thinkdigital.pt>
Date: Tue, 08 Feb 2011 00:10:35 +0100
Message-ID: <58c6bcbc63060d1e69fdf927c7a5079f@thinkdigital.pt>

 On Mon, 7 Feb 2011 15:03:55 -0500, Aryeh Gregor wrote:
> On Mon, Feb 7, 2011 at 12:33 PM, Adam van den Hoven
> <adam at littlefyr.com> wrote:
>> Further, in CommonJS, the library has to export an object in order 
>> to make
>> it available. If we could define things in such a way that the 
>> browser
>> compiled the library independent of the page that loads it, the 
>> browser
>> could cache the *compiled* code and provide that to the browser 
>> page. It
>> would also be necessary to either enforce that these cached 
>> libraries be
>> immutable or that a copy of the compiled code be made available. I 
>> couldn't
>> implement this so I'm not sure how feasible this is but I suspect 
>> that
>> requiring immutability would be the easier to implement.
> What problem does this solve?  How is it better than inserting a
> <script> element, when the returned resource has suitable caching
> headers?

 I think Adam's opinion is a bit influenced by CommonJS. Although I like 
 the require() thingy, I think this feature would be much more 
 appreciated for author app objects and extensions (similar to RequireJS) 
 than HTML specific things like crypto et al.
Received on Monday, 7 February 2011 15:10:35 UTC

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