Re: YUI Libraries
- From: Randy Webb <HikksNotAtHome@xxxxxxx>
- Date: Tue, 01 Jan 2008 11:27:02 -0500
slebetman said the following on 1/1/2008 4:31 AM:
On Jan 1, 4:09 am, Peter Michaux <petermich...@xxxxxxxxx> wrote:On Dec 24, 6:20 pm, Randy Webb <HikksNotAtH...@xxxxxxx> wrote:
<snip>
I don't think we are talking about the same thing. I am considering theIf someone is trying to just "add AJAX" to a site then what happens
scenario where some bonehead decides he wants an "AJAX site" and simply
retrieves entire documents, inserts them via innerHTML into a container,
and then posts here wondering why the scripts aren't executed. And that
is asked a lot here.
when he retrives a page that has document.write in it? I imagine you
draw the line there and that your solution doesn´t support that
situation, true?
Will you be writing up an article about your style of handling all of
this stuff? It seems you've been thinking about dynamic script
insertion and your style of XHR-free Ajax and experimenting for a long
time. I'd sure like to read a distillation of how all the bits work
together as a system, it's pros and cons, etc.
Incedentally, since we are talking about YUI, have a look at how YUI
does it. Look at the get utility and YUIloader.
100Kb uncompressed, 24kb minified, neither of which is very readable. Never thought I would see a 3200 line script to load dependent files though.
Both use dynamic script insertion instead of eval.
From what I read, it isn't doing what we are talking about. A search for createElement returns one place, at line 1017 (in the yuiloader-beta.js file). Then, it depends on UA detection and uses setAttribute.
Of course, YUI only supports loading .js and .css files and not .html so it isn't exactly "bonehead- proof". But that's a good thing IMHO.
What YUILoader appears to be for is loading dependent files and nothing more. If externalFile1.js needs externalFile2.js and externalFile3.js in order to operate properly then YUILoader loads those two files. But, it appears to only work with YUI Code.
I don't care to make a test case, but, if anybody is using it then you can possibly tell me how it deals with a case where it retrieves a document (complete or snippet) via AJAX that has script blocks in it. How does it go about executing those script blocks? Or does it?
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
.
- Follow-Ups:
- Re: YUI Libraries
- From: slebetman
- Re: YUI Libraries
- References:
- Re: YUI Libraries
- From: slebetman
- Re: YUI Libraries
- Prev by Date: Re: RFD: How To Recognize Bad Javascript Code
- Next by Date: Re: how to place javascript in the addressbar !~!!!
- Previous by thread: Re: YUI Libraries
- Next by thread: Re: YUI Libraries
- Index(es):
Relevant Pages
|