Opened 6 years ago

Closed 6 years ago

#17392 closed defect (invalid)

Docs Mention Non-Existent Loader Method: undef()

Reported by: Fergus Hadley Owned by: Rawld Gill
Priority: undecided Milestone: tbd
Component: Documentation Version: 1.9.1
Keywords: Cc:
Blocked By: Blocking:

Description

Docs URL: http://dojotoolkit.org/reference-guide/1.9/loader/amd.html#loader-amd

This line is incorrect: "(Note: the dojo loader includes the nonstandard function require.undef, which undefines a module value.)"

The mentioned method does not exist (although I wish it did!)

Change History (2)

comment:1 Changed 6 years ago by bill

Owner: set to Rawld Gill
Status: newassigned

comment:2 Changed 6 years ago by ben hockey

Resolution: invalid
Status: assignedclosed

it exists... https://github.com/dojo/dojo/blob/1.9.0/dojo.js#L1282-L1290

when loading from source, you need to make sure that the 'dojo-undef-api' has feature is enabled. you can enable the feature using dojoConfig

dojoConfig = {
  has: {
    'dojo-undef-api': 1
  }
};

http://jsfiddle.net/SXCx3/

by default a build will remove the feature so you need to ensure you use staticHasFeatures in your build profile to enable it:

staticHasFeatures: {
  'dojo-undef-api': 1
}
Note: See TracTickets for help on using tickets.