New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Printing a TableSectionElement will print "[Instance of HTMLTableSectionElement]" #6645
Comments
You could think of it as a subclass (even though it is not). The alternative is to introduce a map for the names, >500 entries x 50 bytes = 25k of bloat per download. Or defining >500 toString methods for a similar cost. In the future we may have ambiguity. Image there is a html library and an svg library. Pete: this is one more consideration with the dart:html split. cc @blois. |
Perhaps it should print as "<thead>" "<body>" or "<tfoot>". |
Just to explain why this came up for me: I was writing an extension and since I'm really bad with HTML I printed the nodes that I got from the existing page. I then wanted to find the documentation for them. Without the correct name this becomes a guessing game. |
The node type would work, but would be a further indirection from our documented type. Could also print out the runtimeType. |
Added this to the M3 milestone. |
In Chrome, JS, you can print(document.body) and it will give fancy element selection in the console. I'd much rather have that than using the toString and just getting a string. Removed Area-HTML label. |
The fancy element selection in the console now works with the latest Dartium. I strongly encourage you to use it whenever you need to debug elements. |
Note: to log an element to the console you need to use |
Awesome! Is this something that print() should support as well? It seems that the API converts to a string very early preventing fancier rendering of known types, but the API appears to support it. |
Removed this from the Later milestone. |
Removed Oldschool-Milestone-Later label. |
According to the doc and to the editor the type is called "TableSectionElement", but when I print it, it shows up as HTMLTableSectionElement. ("Instance of 'HTMLTableSectionElement'").
The text was updated successfully, but these errors were encountered: