Closed cb1kenobi closed 2 years ago
+1
I think adding console method detection is a good idea. That being said, there are a couple things wrong with the detection methods.
The console in IE is actually an injected C object, not a native JavaScript object. You can test that by checking for the existence of JavaScript function methods, e.g. typeof console.log.apply
, which will return undefined
in IE.
I know has.js already has native-console detection, but doesn't detect individual methods (log, warn, error, etc), so I added a couple test cases. Probably only useful for gathering metrics.