Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: CordovaJS
    • Labels:
      None

      Description

      There is some room for improvement in the console object we support in Cordova.

      1. not all of the common API is supported. Here is the API as implemented by Firebug, most of which is also implemented in Web Inspector: Firebug Console API. An example of the issue with this is that the weinre demo makes use of markTimeline (actually, that's a WebKit-only console method - I think the only one!). So the demo dies an early death, if Cordova's console wins the "overwrite the native" battle.

      2. which naturally leads to the next issue - the console should daisy chain its calls to the "native" console, if it exists. An example of this issue is that if you use iWebInspector on a Cordova app, console logging happens in the Xcode console, not the iWebInspector console. I'm fine to have it in both places.

      3. console output operations should "buffer". An example of this issue is that any console operations which occur BEFORE deviceReady are passed directly to the bit bucket. Instead, we should "buffer" these, and then when deviceReady occurs, the console can dump what it's buffered.

      Turns out, I have some of these same issues in weinre, but I don't think we can share an implementation. weinre generally just delegates everything to the weinre client - eg, arguments to console.log() are sent as 'remote objects', whereas in Cordova we actually need to evaluate them. The buffering and daisy chaining should be exactly the same, and perhaps those need to be configured (eg, console.daisyChainNative(false)) - maybe the code or at least design could be shared there.

        Issue Links

          Activity

          No work has yet been logged on this issue.

            People

            • Assignee:
              Patrick Mueller
              Reporter:
              Patrick Mueller
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:

                Time Tracking

                Estimated:
                Original Estimate - 256h
                256h
                Remaining:
                Remaining Estimate - 256h
                256h
                Logged:
                Time Spent - Not Specified
                Not Specified

                  Development