Opened 6 years ago

Closed 5 years ago

#14584 closed defect (fixed)

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

Reported by: riceyeh Owned by: Rawld Gill
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 6 years ago by bill

Cc: Rawld Gill added
Component: CoreDojoX Layout
Description: modified (diff)
Summary: "first Dojo wins" policy should not throw "defineAlreadyDefined" errordojox.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 6 years ago by bill

Cc: Rawld Gill removed
Owner: set to Rawld Gill
Status: newassigned

Similar or dup of #14580?

comment:3 Changed 5 years ago by Rawld Gill

Milestone: tbd1.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 5 years ago by Rawld Gill

Resolution: fixed
Status: assignedclosed

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.