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

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

Issue 1097053006: "Reverting 45351" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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_DocumentFragment.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_Element.darttemplate
diff --git a/tools/dom/templates/html/impl/impl_Element.darttemplate b/tools/dom/templates/html/impl/impl_Element.darttemplate
index 816f2b00902d0352a20c39e4d8c63d82e93775f1..14d6abf14b74cd7e7c5b17797fa6e72143953bf9 100644
--- a/tools/dom/templates/html/impl/impl_Element.darttemplate
+++ b/tools/dom/templates/html/impl/impl_Element.darttemplate
@@ -727,10 +727,8 @@ $(ANNOTATIONS)$(NATIVESPEC)abstract class $CLASSNAME$EXTENDS$IMPLEMENTS {
* Parses the specified text as HTML and adds the resulting node after the
* last child of this element.
*/
- void appendHtml(String text, {NodeValidator validator,
- NodeTreeSanitizer treeSanitizer}) {
- this.insertAdjacentHtml('beforeend', text, validator: validator,
- treeSanitizer: treeSanitizer);
+ void appendHtml(String text) {
+ this.insertAdjacentHtml('beforeend', text);
}
/**
@@ -1020,10 +1018,12 @@ $if DART2JS
* * [insertAdjacentText]
* * [insertAdjacentElement]
*/
- void insertAdjacentHtml(String where, String html, {NodeValidator validator,
- NodeTreeSanitizer treeSanitizer}) {
- _insertAdjacentNode(where, new DocumentFragment.html(html,
- validator: validator, treeSanitizer: treeSanitizer));
+ void insertAdjacentHtml(String where, String html) {
+ if (JS('bool', '!!#.insertAdjacentHTML', this)) {
+ _insertAdjacentHtml(where, html);
+ } else {
+ _insertAdjacentNode(where, new DocumentFragment.html(html));
+ }
}
@JSName('insertAdjacentHTML')
« no previous file with comments | « tools/dom/templates/html/impl/impl_DocumentFragment.darttemplate ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698