Opened 2 years ago

Closed 22 months ago

#14584 closed defect (fixed)

dojox.layout.ContentPane: "first Dojo wins" policy should not throw "defineAlreadyDefined" error

Reported by: riceyeh Owned by: rcgill
Priority: high Milestone: 1.8
Component: DojoX Layout Version: 1.7.1
Keywords: Cc:
Blocked by: Blocking:

Description (last modified by bill)

Hi,

A html file loaded by dojox.layout.ContentPane might contain <script src=".../dojo.js"/> in it, the "first Dojo wins" policy just ignore this <scirpt>. For many use cases, such ignorance is good because the first dojo still can be used. However, in dojo 1.7.1, a "defineAlreadyDefined" error is thrown and the code in the html file cannot do anything with the error and hence limits the design based on dojo.

Rice

Change History (4)

comment:1 Changed 2 years ago by bill

  • Cc rcgill added
  • Component changed from Core to DojoX Layout
  • Description modified (diff)
  • Summary changed from "first Dojo wins" policy should not throw "defineAlreadyDefined" error to dojox.layout.ContentPane: "first Dojo wins" policy should not throw "defineAlreadyDefined" error

I'm not sure who this should go to, but I guess it's a problem with dojox.layout.ContentPane rather than the loader itself.

comment:2 Changed 2 years ago by bill

  • Cc rcgill removed
  • Owner set to rcgill
  • Status changed from new to assigned

Similar or dup of #14580?

comment:3 Changed 22 months ago by rcgill

  • Milestone changed from tbd to 1.8

Version 1.8 does not throw.

There is a small abnormality where the second dojo will try to execute deps and callback in the object space defined by a private require which never gets moved to global require. This should be fixed so that trying to load dojo.js twice is effectively a no-op.

comment:4 Changed 22 months ago by rcgill

  • Resolution set to fixed
  • Status changed from assigned to closed

In [29155]:

fixing dojo loader so that subsequent attempts to load dojo.js effectively result in a no-op; fixes #14584; refs #14580; !strict

Note: See TracTickets for help on using tickets.