#13033 closed defect (fixed)
[25087] change on dojo.parser breaks a typical usage of dojo.extend
Reported by: | evan | Owned by: | bill |
---|---|---|---|
Priority: | high | Milestone: | 1.7 |
Component: | Parser | Version: | 1.6.1 |
Keywords: | Cc: | Kris Zyp, [email protected]… | |
Blocked By: | Blocking: |
Description
Just noticed [25087] breaks all Grid testing files and was able to narrow down the cause, the following line change caused the issue:
dojo.parser.js line 48
aspect.after(dlang, "extend", function(){ _nameMap = {}; });
Change it back to
dojo.connect(dlang, "extend", function(){ _nameMap = {}; });
makes things work well.
More specifically, the new change caused the following usage of dojo.extend not working anymore(which was used in dojox.grid._Builder.js)
var clz = dojo.extend(function(view){ this.v1 = 'v1'; this.v2 = 'v2'; this.v_1 = 'v_1'; },{ v_1: "v1", v_2: "v2", f_1: function(){ console.log('f_1') } }); console.log(clz);
clz will be undefined with the new change
Attachments (2)
Change History (8)
Changed 10 years ago by
Attachment: | 13033.html added |
---|
comment:1 Changed 10 years ago by
Cc: | [email protected]… added |
---|
Changed 10 years ago by
Attachment: | 13033.patch added |
---|
A small patch fixes the issue(at least to make all Grid test cases run well)
comment:2 Changed 10 years ago by
Oh, sorry about that. It's bizarre since those two commands should do exactly the same thing. (BTW dojo/_base/connect is not being required by the parser so it's dangerous to use it.) Anyway I'll take a look.
comment:3 Changed 10 years ago by
PS: the tests seem to work fine for me. Even test_grid.html is failing for you? Which browser did you test on?
comment:4 Changed 10 years ago by
Component: | Core → Parser |
---|
Oh, nevermind, I see it, it's a question of the return value from dojo.extend(). I'll fix it.
comment:5 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
The test case to reproduce the issue, pls run it under dojo/tests/