Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#12993 closed defect (wontfix)

call to dojo.ready with dojo.parser buried in dojo*parser definition in build

Reported by: rott Owned by: James Burke
Priority: high Milestone: tbd
Component: BuildTools Version: 1.6.1
Keywords: Cc:
Blocked By: Blocking:

Description

SVN rev: 25049 Ubuntu Linux 10.10 Sun JDK 1.6 Rhino

Please see attached build profile with name "minimal.js", which only pulls in dijit.form.Button and prefixes dijit.

Command:

./build.sh profile=uploader action=clean,release stripConsole=all layerOptimize=shrinksafe optimize=shrinksafe releaseDir=../../../ cssOptimize=comments releaseName=dojo_optimized copyTests=false version=1.7.0

In minimal.js.uncompressed.js, the following block of code is buried in the definition for dojo*parser:

Register the parser callback. It should be the first callback after the a11y test. if(dojo.config.parseOnLoad){

dojo.ready(100, dojo.parser, "parse");

}

This means simply placing djconfig="parseOnLoad: true" in my <script> tag reference to dojo.js won't trigger the parse. I would have to explicitly require dojo/parser, which does register the event, but well after the browser has triggered the onload. Thus I have to not only explicitly require dojo/parser, I also have to call it. Please see attached index.html.

Attachments (3)

minimal.profile.js (849 bytes) - added by rott 9 years ago.
profile
index.html (949 bytes) - added by rott 9 years ago.
sample index.html
minimal.js.uncompressed.js (212.6 KB) - added by rott 9 years ago.
buider output file

Download all attachments as: .zip

Change History (10)

Changed 9 years ago by rott

Attachment: minimal.profile.js added

profile

Changed 9 years ago by rott

Attachment: index.html added

sample index.html

comment:1 Changed 9 years ago by rott

Please make an attempt to reproduce this, as there are additional problems. Using the index.html as is will call the parser, but there are errors such as "Could not load 'dijit.form.Button'" despite that module clearly being defined in the minimal.js build output.

comment:2 Changed 9 years ago by rott

Correction: profile=uploader should be profile=minimal in the command line.

Changed 9 years ago by rott

Attachment: minimal.js.uncompressed.js added

buider output file

comment:3 Changed 9 years ago by rott

Ahhhh... so sorry for the churn on this. I just tested against source. Same problem. In fact, I don't even see parser.js getting downloaded in the network tab in the Chrome dev tools.

Please change to base since this is now not really a builder problem.

comment:4 Changed 9 years ago by rott

Cancelling this one. I see now that in 1.7 you must explicitly require dojo.parser.

Please cancel.

comment:5 Changed 9 years ago by Chris Mitchell

Resolution: wontfix
Status: newclosed

comment:6 Changed 9 years ago by Kenneth G. Franqueiro

Just want to clarify, this was closed as "wontfix" but it's more "invalid" really, since in reality dojo.parser was NEVER automatically required for parseOnLoad... See documentation ticket I entered, #12997. (I actually entered that based on feedback by rott on IRC; I hadn't noticed this ticket.)

comment:7 Changed 9 years ago by Chris Mitchell

it was automatically required by _Templated, and many examples/testcases did not require it... so there are lot's cases where customers have taken these examples and used them...even if technically it was safer to do the require.

Note: See TracTickets for help on using tickets.