[dojo-contributors] self executing scripts

Bryan Forbes bryan at reigndropsfall.net
Sun May 31 19:05:04 EDT 2009


I like it.  It's elegant and it saves on bandwidth... even if it's just
a little bit.  I'm +1.

On Sun, 2009-05-31 at 11:00 -0400, Peter E Higgins wrote:
> Hi List,
> 
> I don't normally cross post / blog, but I am quite curious to hear if
> anyone thinks this is a good idea for Dojo:
> 
> http://higginsforpresident.net/2009/05/degrading-script-tags/
> 
> The jist is: a syntax like this would work:
> 
> <script src="dojo/dojo.js" djConig="parseOnLoad:true">
>     dojo.require("dijit.TitlePane");
>     dojo.require("dijit.layout.BorderContainer");
>     // or just:
>     dojo.require("my.application");
> </script>
> 
> It is "kind of magic", but I like it [though am unsure if anyone else
> would find it handy]. If dojo.js is a 404, nothing at all will happen,
> failing silently but easily identifiable in firebug. The progressive
> JS case comes to mind.
> 
> It requires a 3-line patch to base, which at the moment includes an
> #ifdef to remove the functionality by way of a build kwArg 'noSelf=true'
> 
> Regards,
> Peter
> 
-- 
======================================================================
Bryan Forbes
bryan at reigndropsfall.net
http://www.reigndropsfall.net

"It does not take a majority to prevail, but rather an irate, tireless
minority keen to set brush fires in people's minds."
        - Samuel Adams, an architect of the Constitution

Key fingerprint = 3D7D B728 713A BB7B B8B1  5B61 3888 17E0 70CA 0F3D
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://mail.dojotoolkit.org/pipermail/dojo-contributors/attachments/20090531/94f2a017/attachment.sig 


More information about the dojo-contributors mailing list