Open yutak opened 10 years ago
Added Area-Library, Library-Html, Triaged labels.
I don't understand what's being asked for that can't be done with string interpolation.
window.console.log(' Debug: $window $document');
It refers to pretty-printing the objects, which from the MDN docs seems like it means printing them as a map in JS. But Dart objects don't have that representation, and just being able to produce it adds runtime overhead that I don't think we'd want to do.
Removed Type-Defect label. Added Type-Enhancement, NeedsInfo labels.
For example, type "console.log(document, document, document)" in Chrome's JavaScript console. You will see three #documents that can be clicked to open, so you can browse the content of the document tree inside the developer console. This can't be done with string interpolation.
Any word on this? This is also important to print text with CSS styles.
For example in JS i can do: In Dart the only way I have to do this is to call the method from JS with dart:js.
With JS, I can write something like:
window.console.log('Debug: ', window, document);
This pretty-prints objects passed in the argument list (instead of toString()'ed ones).
See https://developer.mozilla.org/en/docs/Web/API/console
The counterpart of Dart, however, only accepts just one Object, and thus I can't write equivalent code in Dart.
https://api.dartlang.org/apidocs/channels/stable/dartdoc-viewer/dart-dom-html.Console