Opened 8 years ago

Closed 7 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.

  1. Load dojo.js
  2. require(["dojo/main"])
  3. dojo.ready(function(){console.log("test")})=> "test"
  4. require(["doesntexist"]) => Error
  5. dojo.ready(function(){alert("test")})=> nothing

Version: 1.7.0b5 and trunk

Change History (7)

comment:1 Changed 8 years ago by bill

Component: GeneralLoader
Owner: set to Rawld Gill

comment:2 Changed 8 years ago by Rawld Gill

Status: newassigned

comment:3 Changed 8 years ago by Rawld Gill

Resolution: invalid
Status: assignedclosed

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.

comment:4 Changed 8 years ago by xMartin

Resolution: invalid
Status: closedreopened

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 7 years ago by Rawld Gill

Status: reopenedassigned

comment:6 Changed 7 years ago by Rawld Gill

Milestone: 1.8future
Priority: highlow
Type: defectenhancement

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 7 years ago by Rawld Gill

Resolution: duplicate
Status: assignedclosed

Loader recovery from errors will be tracked on #15194

Note: See TracTickets for help on using tickets.