#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 )
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)
Change History (5)
Changed 10 years ago by
Attachment: | onmissingfile.html added |
---|
comment:1 Changed 10 years ago by
Description: | modified (diff) |
---|
comment:2 Changed 9 years ago by
Milestone: | tbd → 1.9 |
---|---|
Status: | new → assigned |
comment:3 Changed 9 years ago by
Resolution: | → worksforme |
---|---|
Status: | assigned → closed |
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 9 years ago by
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?
test case to be placed in dojo/tests/_base/loader