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 = {},
|
var cache = {},
|
||||||
//dfd = $.Deferred(),
|
//dfd = $.Deferred(),
|
||||||
$element = Ox.Element(),
|
$element,
|
||||||
pending = {},
|
pending = {},
|
||||||
requests = {},
|
requests = {},
|
||||||
self = {
|
self = {
|
||||||
|
@ -63,7 +63,12 @@ Ox.Request = (function() {
|
||||||
/*@
|
/*@
|
||||||
bindEvent <f> bindEvent to error/authrize requests
|
bindEvent <f> bindEvent to error/authrize requests
|
||||||
@*/
|
@*/
|
||||||
bindEvent: $element.bindEvent,
|
bindEvent: function() {
|
||||||
|
if(!$element) {
|
||||||
|
$element = Ox.Element();
|
||||||
|
}
|
||||||
|
$element.bindEvent.apply(this, arguments);
|
||||||
|
},
|
||||||
|
|
||||||
// fixme: remove
|
// fixme: remove
|
||||||
_leakCache: function() {
|
_leakCache: function() {
|
||||||
|
@ -189,6 +194,13 @@ Ox.Request = (function() {
|
||||||
|
|
||||||
return options.id;
|
return options.id;
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/*@
|
||||||
|
unbindEvent <f> unbindEvent for error/authrize requests
|
||||||
|
@*/
|
||||||
|
unbindEvent: function() {
|
||||||
|
$element && $element.unbindEvent.apply(this, arguments);
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue