Opened 13 years ago
Closed 13 years ago
#8797 closed defect (fixed)
Base _loader needless code
Reported by: | dante | Owned by: | James Burke |
---|---|---|---|
Priority: | high | Milestone: | 1.3 |
Component: | Core | Version: | 1.3.0b2 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
The _fakeLoader call currently passes a fake 'type:"load"' object to _loadInit. This is unnecessary as _loadInit defaults to "load" if no event was passed.
saves 15 bytes or so.
patch attached.
Attachments (1)
Change History (5)
Changed 13 years ago by
Attachment: | loader.diff added |
---|
comment:1 Changed 13 years ago by
Component: | General → Core |
---|
I did not check to see if:
dojo._fakeLoadInit = dojo._loadInit
would work. I assumed _fadeLoadInit was bound to some actual event, and in doing the above we would be passing a different event than expected to the real _loadInit. Either way _loadInit is setup to handle the null event case.
comment:2 Changed 13 years ago by
Milestone: | tbd → 1.3 |
---|
We can get rid of _fakeLoadInit altogether. It is called in util/buildscripts/jslib/dojoGuardEnd.jsfrag. I think I originally had more going on in the fakeInit, and also wanted to call dojo._loadInit with dojo as the "this" object. Although looks like dojo._init internals do not assume, and all the other callers of dojo._loadInit do not perserve dojo as "this". Just useless code. I will remove it now.
comment:3 Changed 13 years ago by
comment:4 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
patch, been in local trunk for months now - forgot to file ticket earlier.