Open GoogleCodeExporter opened 8 years ago
I think this is because a <TR> can't live inside a <DIV>, but
htmlToDocumentFragment() puts everything in a temp div, so the fragment winds
up being invalid and it strips out the <TR> and <TD>.
It'd be nice if the documentation at least said something along the lines of
"this function won't work if you pass it html that can't directly be in a div".
Or something.
Original comment by ty...@google.com
on 20 Jul 2011 at 12:24
Browser behaving as expected here. Should be surrounded by <table>. You could
possibly wrap in <table> tags and pull out the td elements as a separate step.
Original comment by nn...@google.com
on 27 Apr 2012 at 9:30
Actually tyang is correct. We should add documentation. A real DocumentFragment
can contains td. It's just the way we're creating the DocumentFragment (with a
'div' parent) that causes this to not work.
Original comment by chrishe...@google.com
on 27 Apr 2012 at 9:35
If this isn't something that won't be fixed how can you handle the situation
where you are constructing a table in sections?
For example if I want to render a table by rendering the thead and then create
a control for every row in the table, how can that be done if you can't render
a fragment <tr><td>test</td><td>fragment</td></tr>?
Original comment by and...@gospotcheck.com
on 19 Oct 2012 at 5:22
Original issue reported on code.google.com by
ache...@gmail.com
on 20 Sep 2010 at 9:19