You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This discrepancy is due to a known bug in goog.dom.htmlToDocumentFragment: http://code.google.com/p/closure-library/issues/detail?id=210. The TR and TD (as well as TH, THEAD, TBODY, TFOOT) tags are stripped out when converting from a string to DOM elements, leaving only concatenated text nodes.
This issue impacts a use case that I think is quite common -- A string containing a table row is used as a template for each element of a collection, it is manipulated and inserted into the DOM.
The text was updated successfully, but these errors were encountered:
bobby
added a commit
to bobby/domina
that referenced
this issue
Feb 1, 2012
- Includes support for table fragments -- fixeslevand#7
- Improvement in performance and consistency of apply-with-cloning
- HTML strings now act consistently with other content types
- Uses DocumentFragments only as an implementation detail, no DocumentFragments are ever returned from API functions -- closeslevand#8
Expected:
to print to the console:
i.e. a Table Row Element
Actual
printed to the console:
i.e. a Text Node Element
This discrepancy is due to a known bug in goog.dom.htmlToDocumentFragment: http://code.google.com/p/closure-library/issues/detail?id=210. The TR and TD (as well as TH, THEAD, TBODY, TFOOT) tags are stripped out when converting from a string to DOM elements, leaving only concatenated text nodes.
This issue impacts a use case that I think is quite common -- A string containing a table row is used as a template for each element of a collection, it is manipulated and inserted into the DOM.
The text was updated successfully, but these errors were encountered: