Opened 10 years ago

Closed 10 years ago

#15425 closed defect (invalid)

dojo/aspect receiveArguments parameter

Reported by: [email protected] Owned by: [email protected]
Priority: undecided Milestone: tbd
Component: Core Version: 1.7.2
Keywords: Cc:
Blocked By: Blocking:


When I use dojo/aspect without receiveArguments parameter or false value and call object method with arguments, the aspect function pass these arguments into function too. Why? is it bug or normal behaviour?

require(["dojo/ready", "dojo/aspect"], function(ready, aspect) {

ready(function() {

var Aspect_obj = {

method : function(param1, param2) {

console.log("Aspect_obj method " + param1 + ", " + param2);


} function callMe(param1, param2) {

console.log("callMe function " + param1 + ", " + param2);


aspect.before(Aspect_obj, "method", callMe, false); Aspect_obj.method(1, 2); console.log("--------------------------");

aspect.after(Aspect_obj, "method", callMe); Aspect_obj.method(1, 2);



Change History (3)

comment:1 Changed 10 years ago by bill

Owner: set to [email protected]
Status: newpending

before() doesn't have a receiveArguments parameter (again, see the documentation). are you having an issue with aspect.after()?

comment:2 Changed 10 years ago by [email protected]

Status: pendingnew

I test it again and before() method is ok. I have read a non-dojo docs article and thought that (target, methodName, advisingFunction, receiveArguments) is for all methods of dojo/aspect. You can delete this ticket.

comment:3 Changed 10 years ago by bill

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.