dont depend on Ox.Element in Ox.Request instantiation
This commit is contained in:
parent
216ad5f44f
commit
f7755eb303
1 changed files with 14 additions and 2 deletions
|
@ -13,7 +13,7 @@ Ox.Request = (function() {
|
|||
|
||||
var cache = {},
|
||||
//dfd = $.Deferred(),
|
||||
$element = Ox.Element(),
|
||||
$element,
|
||||
pending = {},
|
||||
requests = {},
|
||||
self = {
|
||||
|
@ -63,7 +63,12 @@ Ox.Request = (function() {
|
|||
/*@
|
||||
bindEvent <f> bindEvent to error/authrize requests
|
||||
@*/
|
||||
bindEvent: $element.bindEvent,
|
||||
bindEvent: function() {
|
||||
if(!$element) {
|
||||
$element = Ox.Element();
|
||||
}
|
||||
$element.bindEvent.apply(this, arguments);
|
||||
},
|
||||
|
||||
// fixme: remove
|
||||
_leakCache: function() {
|
||||
|
@ -189,6 +194,13 @@ Ox.Request = (function() {
|
|||
|
||||
return options.id;
|
||||
|
||||
},
|
||||
|
||||
/*@
|
||||
unbindEvent <f> unbindEvent for error/authrize requests
|
||||
@*/
|
||||
unbindEvent: function() {
|
||||
$element && $element.unbindEvent.apply(this, arguments);
|
||||
}
|
||||
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue