Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Unified Diff: tools/dom/templates/html/impl/impl_HTMLTableSectionElement.darttemplate

Issue 23646003: Fixing createFragment on IE9 Table elements (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/dom/templates/html/impl/impl_HTMLTableRowElement.darttemplate ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/templates/html/impl/impl_HTMLTableSectionElement.darttemplate
diff --git a/tools/dom/templates/html/impl/impl_HTMLTableSectionElement.darttemplate b/tools/dom/templates/html/impl/impl_HTMLTableSectionElement.darttemplate
index 5f479325e15e918d02820480dc3e378d0b8cbf92..e15a540a0ade6c4ea898fbca57763b76ab37e334 100644
--- a/tools/dom/templates/html/impl/impl_HTMLTableSectionElement.darttemplate
+++ b/tools/dom/templates/html/impl/impl_HTMLTableSectionElement.darttemplate
@@ -17,4 +17,20 @@ $(ANNOTATIONS)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
TableRowElement insertRow(int index) => _insertRow(index);
+$if DART2JS
+ DocumentFragment createFragment(String html,
+ {NodeValidator validator, NodeTreeSanitizer treeSanitizer}) {
+ if (Range.supportsCreateContextualFragment) {
+ return super.createFragment(
+ html, validator: validator, treeSanitizer: treeSanitizer);
+ }
+ // IE9 workaround which does not support innerHTML on Table elements.
+ var fragment = new DocumentFragment();
+ var section = new TableElement().createFragment(
+ html, validator: validator, treeSanitizer: treeSanitizer).nodes.single;
+ fragment.nodes.addAll(section.nodes);
+ return fragment;
+ }
+$endif
+
$!MEMBERS}
« no previous file with comments | « tools/dom/templates/html/impl/impl_HTMLTableRowElement.darttemplate ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698