Werner Punz wrote:
Laurie Harper schrieb:
Werner Punz wrote:
The next 1-2 days depending on my schedule there will be minor
corrections on the Dojo codebase.
The requires and component includes will be moved from the head to the
body due to the fact that some dojo components require to have it in the
body section.
If you have used the codebase there will be a minor change in the
DojoUtils class, in the addRequire methods.
I will alter all existing components accordingly once my integration
tests over here are done.
What's the issue that's requiring this change? I haven't had any
problems with putting all scripts in the document head, and it
certainly *shouldn't* be required to place them in the body.
The issue is that I had a combination of components (one of them
probably triggering the problem being the dialog)
which caused an error on the dojo debug level.
The error was something like dojo.component.manager could not be
initialized.
I tried the markup in various combinations and moving all the requires
and the internal include (not the dojo include) down to the body
resolved the problem entirely.
Weird. If you could narrow it down to a simple test case demonstrating
the problem I'm sure it could be fixed. My first guess would be
something other than a dojo.require() happening that needed to be
deferred until onLoad, though.
I also checked later the dojo examples and the ones I checked, all did
the initialization in the body for one reason or the other.
Afterwards I also contacted Mario who does the current refactoring of
the addresource, and he said he would prefer to have this stuff in the
body due to future performance refactoring reasons.
So I am going to move the require and component includes down to the
body while the dojo include still stays in the head for now.
Hmm, I thought there were XHTML compliance issues with having <script>
tags in the body? That's why I queried this in the first place :)
Although it appears to work, valid or not.
L.