AdapterJS icon indicating copy to clipboard operation
AdapterJS copied to clipboard

0.10.5: In IE 9, opening the console before the page loads doesn't show any logs

Open oooookk7 opened this issue 9 years ago • 1 comments

It is noted that in this fix:

// IE 9 is not offering an implementation of console.log until you open a console
  if (typeof console !== 'object' || typeof console.log !== 'function') {
    /* jshint -W020 */
    console = {} || console;
    // Implemented based on console specs from MDN
    // You may override these functions
    console.log = function (arg) {};
    console.info = function (arg) {};
    console.error = function (arg) {};
    console.dir = function (arg) {};
    console.exception = function (arg) {};
    console.trace = function (arg) {};
    console.warn = function (arg) {};
    console.count = function (arg) {};
    console.debug = function (arg) {};
    console.count = function (arg) {};
    console.time = function (arg) {};
    console.timeEnd = function (arg) {};
    console.group = function (arg) {};
    console.groupCollapsed = function (arg) {};
    console.groupEnd = function (arg) {};
    /* jshint +W020 */
  }

This was to prevent the adapterjs from running into errors when console is not opened, but however when the console is opened in IE9 before the page loads, it should appear the logs, which it doesn't.

oooookk7 avatar Mar 05 '15 04:03 oooookk7

Interesting. It should be fairly easy to fix. I'll give it a look... Monday, I hope.

On 05 Mar 2015, at 05:00, Leticia Choo [email protected] wrote:

It is noted that in this fix:

// IE 9 is not offering an implementation of console.log until you open a console if (typeof console !== 'object' || typeof console.log !== 'function') { /* jshint -W020 / console = {} || console; // Implemented based on console specs from MDN // You may override these functions console.log = function (arg) {}; console.info = function (arg) {}; console.error = function (arg) {}; console.dir = function (arg) {}; console.exception = function (arg) {}; console.trace = function (arg) {}; console.warn = function (arg) {}; console.count = function (arg) {}; console.debug = function (arg) {}; console.count = function (arg) {}; console.time = function (arg) {}; console.timeEnd = function (arg) {}; console.group = function (arg) {}; console.groupCollapsed = function (arg) {}; console.groupEnd = function (arg) {}; / jshint +W020 */ } This was to prevent the adapterjs from running into errors when console is not opened, but however when the console is opened in IE9 before the page loads, it should appear the logs, which it doesn't.

— Reply to this email directly or view it on GitHub.

johache avatar Mar 05 '15 10:03 johache