Opened 9 years ago
Closed 9 years ago
#15425 closed defect (invalid)
dojo/aspect receiveArguments parameter
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | tbd |
Component: | Core | Version: | 1.7.2 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
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 9 years ago by
Owner: | set to [email protected]… |
---|---|
Status: | new → pending |
comment:2 Changed 9 years ago by
Status: | pending → new |
---|
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 9 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
before() doesn't have a receiveArguments parameter (again, see the documentation). are you having an issue with aspect.after()?