Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#16032 closed defect (worksforme)

dojo/ready is definitely broken once you tried to load a non existing resource using dojo/text

Reported by: cjolif Owned by: Rawld Gill
Priority: undecided Milestone: 1.9
Component: Loader Version: 1.8.0
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by cjolif)

dojo/ready is definitely broken once you tried to load a non existing resource using dojo/text.

On the contrary when you try to load a non existing AMD module this is not breaking dojo ready.

The current behavior is problematic because if you have a part of your application that is loading a missing resource other part are impacted. This is also problematic because the behavior is not consistent with loading missing AMD modules.

See attached example.

Attachments (1)

onmissingfile.html (1.6 KB) - added by cjolif 7 years ago.
test case to be placed in dojo/tests/_base/loader

Download all attachments as: .zip

Change History (5)

Changed 7 years ago by cjolif

Attachment: onmissingfile.html added

test case to be placed in dojo/tests/_base/loader

comment:1 Changed 7 years ago by cjolif

Description: modified (diff)

comment:2 Changed 7 years ago by Rawld Gill

Milestone: tbd1.9
Status: newassigned

comment:3 Changed 7 years ago by Rawld Gill

Resolution: worksforme
Status: assignedclosed

I'm not seeing the behavior you are reporting. I'm seeing the requires that successfully load their module lists executing their callbacks, but after a module fails to load (AMD or text!) dojo/ready never executes another callback. I also think this is the correct behavior according to http://dojotoolkit.org/reference-guide/1.8/dojo/ready.html#dojo-ready

Feel free to reopen and explain where the behavior is wrong and/or propose different behavior.

comment:4 Changed 7 years ago by cjolif

Ok. I guess then the problem is more that some Dojo library code is using dojo/ready. And so if in _your_ app you have a module that does not load this breaks library code which it should not. In order to avoid that is there a way to test for a module presence? It seems requireJS provides require.specified() for that? Do we have something similar?

Note: See TracTickets for help on using tickets.