Manipulating the DOM during page load.

P

Peter Michaux

Hi,

With the Yahoo! UI Event library it is possible to poll the DOM as the
page loads for the appearance of a particular element. When that
element is found a callback function executes. In Flanagan's book he
warns that some JavaScript experts say this is bad practice because it
is not standardized. I've tried the YUI technique only a little and
like the idea for some pages to make certain parts interactive before
all pictures etc have been loaded. Does anyone here have info about
when this technique fails?

Thanks,
Peter
 
N

naixn

Peter Michaux wrote :
Hi,

With the Yahoo! UI Event library it is possible to poll the DOM as the
page loads for the appearance of a particular element. When that
element is found a callback function executes. In Flanagan's book he
warns that some JavaScript experts say this is bad practice because it
is not standardized. I've tried the YUI technique only a little and
like the idea for some pages to make certain parts interactive before
all pictures etc have been loaded. Does anyone here have info about
when this technique fails?

Thanks,
Peter

I think it can lead to some misconception.
For example, you absoluty need to call a function as soon as the element is
loaded, but this function would call another one, whose job would be to inspect
the DOM structure. As the page isn't fully loaded, it can lead to some errors.

In fact, that doesn't happen everytime, but the fact that there MAY be a little
flaw is to take care of.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top