Opened 9 years ago
Closed 9 years ago
#13825 closed enhancement (duplicate)
dojo.ready does not fire after faulty require
Reported by: | xMartin | Owned by: | Rawld Gill |
---|---|---|---|
Priority: | low | Milestone: | future |
Component: | Loader | Version: | |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Functions passed to dojo.ready are not called if a non-exisiting resource was required.
- Load dojo.js
require(["dojo/main"])
dojo.ready(function(){console.log("test")})
=> "test"require(["doesntexist"])
=> Errordojo.ready(function(){alert("test")})
=> nothing
Version: 1.7.0b5 and trunk
Change History (7)
comment:1 Changed 9 years ago by
Component: | General → Loader |
---|---|
Owner: | set to Rawld Gill |
comment:2 Changed 9 years ago by
Status: | new → assigned |
---|
comment:3 Changed 9 years ago by
Resolution: | → invalid |
---|---|
Status: | assigned → closed |
comment:4 Changed 9 years ago by
Resolution: | invalid |
---|---|
Status: | closed → reopened |
Is there a way to handle errors, then? So I can manually tell the loader that all dependencies are handled and "ready" should be called? There's a discussion about error handling on the amd-implement list (https://groups.google.com/forum/#!topic/amd-implement/u0f161drdJA).
comment:5 Changed 9 years ago by
Status: | reopened → assigned |
---|
comment:6 Changed 9 years ago by
Milestone: | 1.8 → future |
---|---|
Priority: | high → low |
Type: | defect → enhancement |
I'm prototyping some recovery ideas and debating on amd-implement. But since the loader is working as spec'd, I'm moving milestone/priority...though I'm still hopeful of moving this into 1.8.
comment:7 Changed 9 years ago by
Resolution: | → duplicate |
---|---|
Status: | assigned → closed |
Loader recovery from errors will be tracked on #15194
By definition, dojo.ready calls the callback after all requested modules have been loaded. iiuc, a module is demanded that is never loaded; therefore dojo.ready is functioning iaw spec.