2010-04-05 18:46:53 +00:00
|
|
|
var browserSingleton;
|
2010-09-22 21:37:17 +00:00
|
|
|
angularService('$browser', function($log){
|
2010-04-05 18:46:53 +00:00
|
|
|
if (!browserSingleton) {
|
2010-07-22 18:18:32 +00:00
|
|
|
browserSingleton = new Browser(
|
|
|
|
|
window.location,
|
|
|
|
|
jqLite(window.document),
|
2010-09-22 11:24:40 +00:00
|
|
|
jqLite(window.document.getElementsByTagName('head')[0]),
|
2010-09-22 21:37:17 +00:00
|
|
|
XHR,
|
|
|
|
|
$log);
|
2010-09-22 11:24:40 +00:00
|
|
|
browserSingleton.startPoller(50, function(delay, fn){setTimeout(delay,fn);});
|
2010-04-06 03:53:33 +00:00
|
|
|
browserSingleton.bind();
|
2010-04-05 18:46:53 +00:00
|
|
|
}
|
|
|
|
|
return browserSingleton;
|
2010-09-22 21:37:17 +00:00
|
|
|
}, {inject:['$log']});
|
2010-04-05 18:46:53 +00:00
|
|
|
|
|
|
|
|
extend(angular, {
|
|
|
|
|
'element': jqLite,
|
|
|
|
|
'compile': compile,
|
|
|
|
|
'scope': createScope,
|
|
|
|
|
'copy': copy,
|
|
|
|
|
'extend': extend,
|
2010-07-19 19:29:24 +00:00
|
|
|
'equals': equals,
|
2010-04-05 18:46:53 +00:00
|
|
|
'foreach': foreach,
|
|
|
|
|
'noop':noop,
|
2010-04-15 21:17:33 +00:00
|
|
|
'bind':bind,
|
2010-07-20 23:55:32 +00:00
|
|
|
'toJson': toJson,
|
|
|
|
|
'fromJson': fromJson,
|
2010-04-05 18:46:53 +00:00
|
|
|
'identity':identity,
|
|
|
|
|
'isUndefined': isUndefined,
|
|
|
|
|
'isDefined': isDefined,
|
|
|
|
|
'isString': isString,
|
|
|
|
|
'isFunction': isFunction,
|
2010-05-07 19:09:14 +00:00
|
|
|
'isObject': isObject,
|
2010-04-05 18:46:53 +00:00
|
|
|
'isNumber': isNumber,
|
|
|
|
|
'isArray': isArray
|
|
|
|
|
});
|
|
|
|
|
|