Skip to content

Improve the output of print(someJsObject) #27117

@kevmoo

Description

@kevmoo

With the use of interop, it'll be common for folks to print(someObject) which may be a native JS object. While in many cases we don't provide a "pretty" output, because of tricks that ClosureCompiler and others do with their types, we could certainly improve the experience.

Here's an example of window.console.debug(...) vs print(...) of the same object.

screen shot 2016-08-19 at 11 13 20 am

While Lf { idToken: ...} is not perfect, it's much more useful than [object Object]

Could we create a slightly more helpful output here? Even something opt-in could be really useful.

See discussion here: Janamou/firebase3-dart#11 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-web-jsIssues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.web-dart2jsweb-js-interopIssues that impact all js interop

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions