| 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 2eca0ca59ea0ed36e2c086b1a665e28c8a4ea01f..d18eb4b94f78b6cb6df62d7d676c05d7fbbff32c 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);
|
| }
|
|
|
| /**
|
| @@ -986,9 +984,6 @@ $if DART2JS
|
|
|
| @JSName('insertAdjacentText')
|
| void _insertAdjacentText(String where, String text) native;
|
| -
|
| -$else
|
| -$endif
|
|
|
| /**
|
| * Parses text as an HTML fragment and inserts it into the DOM at the
|
| @@ -1012,14 +1007,14 @@ $endif
|
| * * [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));
|
| + }
|
| }
|
|
|
| -$if DART2JS
|
| -
|
| @JSName('insertAdjacentHTML')
|
| void _insertAdjacentHtml(String where, String text) native;
|
|
|
| @@ -1064,13 +1059,7 @@ $if DART2JS
|
| throw new ArgumentError("Invalid position ${where}");
|
| }
|
| }
|
| -$else
|
| - void _insertAdjacentNode(String where, Node node) {
|
| - insertAdjacentElement(where, node);
|
| - }
|
| -$endif
|
|
|
| -$if DART2JS
|
| /**
|
| * Checks if this element matches the CSS selectors.
|
| */
|
|
|