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

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

Issue 22967006: Adding polyfill support for custom elements. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Removing mutation observer polyfill from test. 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
Index: tools/dom/templates/html/impl/impl_Element.darttemplate
diff --git a/tools/dom/templates/html/impl/impl_Element.darttemplate b/tools/dom/templates/html/impl/impl_Element.darttemplate
index cbea8c1aed4623ebbe6782df2bbf15f8827e0620..054c5e0eab520cda0e797214f581fa2bbd5581e5 100644
--- a/tools/dom/templates/html/impl/impl_Element.darttemplate
+++ b/tools/dom/templates/html/impl/impl_Element.darttemplate
@@ -244,7 +244,7 @@ abstract class ElementList<T extends Element> extends ListBase<T> {
*/
@Experimental()
CssRect get marginEdge;
-$!STREAM_GETTER_SIGNATURES
+$!STREAM_GETTER_SIGNATURES
}
// TODO(jacobr): this is an inefficient implementation but it is hard to see
@@ -1170,6 +1170,20 @@ $endif
Point p = Element._offsetToHelper(parentOffset, parent);
return new Point(p.x + current.offsetLeft, p.y + current.offsetTop);
}
+
+$if DART2JS
+ @JSName('innerHTML')
+ @DomName('HTMLElement.innerHTML')
+ String get innerHtml;
+
+ void set innerHtml(String value) {
+ JS('', '#.innerHTML = #', this, value);
+ // Polyfill relies on mutation observers for upgrading, but we want it
Jennifer Messerly 2013/08/20 19:09:59 Interesting that the polyfill works this way... do
blois 2013/08/20 19:36:56 It's synchronous in clone and document.createEleme
+ // immediate.
+ Platform.upgradeCustomElements(this);
+ }
+$endif
+
$!MEMBERS
}

Powered by Google App Engine
This is Rietveld 408576698