mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-03-29 00:09:01 +08:00
clean up error reporting
This commit is contained in:
@@ -3,8 +3,6 @@
|
||||
if (typeof document.getAttribute == 'undefined')
|
||||
document.getAttribute = function() {};
|
||||
|
||||
if (!window['console']) window['console']={'log':noop, 'error':noop};
|
||||
|
||||
var consoleNode,
|
||||
PRIORITY_FIRST = -99999,
|
||||
PRIORITY_WATCH = -1000,
|
||||
@@ -18,6 +16,7 @@ var consoleNode,
|
||||
msie = !!/(msie) ([\w.]+)/.exec(lowercase(navigator.userAgent)),
|
||||
jqLite = jQuery || jqLiteWrap,
|
||||
slice = Array.prototype.slice,
|
||||
error = window['console'] ? bind(window['console'], window['console']['error']) : noop,
|
||||
angular = window['angular'] || (window['angular'] = {}),
|
||||
angularTextMarkup = extensionMap(angular, 'textMarkup'),
|
||||
angularAttrMarkup = extensionMap(angular, 'attrMarkup'),
|
||||
@@ -174,21 +173,6 @@ function indexOf(array, obj) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
function error(a, b, c){
|
||||
var console = window['console'];
|
||||
switch(arguments.length) {
|
||||
case 1:
|
||||
console['error'](a);
|
||||
break;
|
||||
case 2:
|
||||
console['error'](a, b);
|
||||
break;
|
||||
default:
|
||||
console['error'](a, b, c);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
function isLeafNode (node) {
|
||||
if (node) {
|
||||
switch (node.nodeName) {
|
||||
|
||||
Reference in New Issue
Block a user