Opened 8 years ago

Closed 8 years ago

#12715 closed defect (duplicate)

require.ready() tries to invoke the context as a function

Reported by: haysmark Owned by: Rawld Gill
Priority: high Milestone: tbd
Component: Core Version: 1.6.0
Keywords: Cc:
Blocked By: Blocking:

Description

Suppose on ready I want to invoke an anonymous function and assign it an object context, for instance:

require.ready(doh, function(){
alert(this==doh); // should be true
});

I instead get an error: "context is not a function." From the ready code, it seems that it is trying to invoke doh rather than my function, because my function was not a string?

Change History (1)

comment:1 Changed 8 years ago by ben hockey

Resolution: duplicate
Status: newclosed

see http://bugs.dojotoolkit.org/ticket/12672#comment:25 and http://bugs.dojotoolkit.org/attachment/ticket/12672/12672-25.diff

if we need to track this separately then i suppose we could reopen this bug for that purpose.

Note: See TracTickets for help on using tickets.