OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 part of $LIBRARYNAME; | 5 part of $LIBRARYNAME; |
6 | 6 |
7 class _ChildrenElementList extends ListBase<Element> | 7 class _ChildrenElementList extends ListBase<Element> |
8 implements NodeListWrapper { | 8 implements NodeListWrapper { |
9 // Raw Element. | 9 // Raw Element. |
10 final Element _element; | 10 final Element _element; |
(...skipping 999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1010 * See also: | 1010 * See also: |
1011 * | 1011 * |
1012 * * [insertAdjacentText] | 1012 * * [insertAdjacentText] |
1013 * * [insertAdjacentElement] | 1013 * * [insertAdjacentElement] |
1014 */ | 1014 */ |
1015 void insertAdjacentHtml(String where, String html, {NodeValidator validator, | 1015 void insertAdjacentHtml(String where, String html, {NodeValidator validator, |
1016 NodeTreeSanitizer treeSanitizer}) { | 1016 NodeTreeSanitizer treeSanitizer}) { |
1017 if (treeSanitizer is _TrustedHtmlTreeSanitizer) { | 1017 if (treeSanitizer is _TrustedHtmlTreeSanitizer) { |
1018 _insertAdjacentHtml(where, html); | 1018 _insertAdjacentHtml(where, html); |
1019 } else { | 1019 } else { |
1020 _insertAdjacentNode(where, createFragment(html, | 1020 _insertAdjacentNode(where, new DocumentFragment.html(html, |
1021 validator: validator, treeSanitizer: treeSanitizer)); | 1021 validator: validator, treeSanitizer: treeSanitizer)); |
1022 } | 1022 } |
1023 } | 1023 } |
1024 | 1024 |
1025 $if DART2JS | 1025 $if DART2JS |
1026 | 1026 |
1027 @JSName('insertAdjacentHTML') | 1027 @JSName('insertAdjacentHTML') |
1028 void _insertAdjacentHtml(String where, String text) native; | 1028 void _insertAdjacentHtml(String where, String text) native; |
1029 | 1029 |
1030 /** | 1030 /** |
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1582 const ScrollAlignment._internal(this._value); | 1582 const ScrollAlignment._internal(this._value); |
1583 toString() => 'ScrollAlignment.$_value'; | 1583 toString() => 'ScrollAlignment.$_value'; |
1584 | 1584 |
1585 /// Attempt to align the element to the top of the scrollable area. | 1585 /// Attempt to align the element to the top of the scrollable area. |
1586 static const TOP = const ScrollAlignment._internal('TOP'); | 1586 static const TOP = const ScrollAlignment._internal('TOP'); |
1587 /// Attempt to center the element in the scrollable area. | 1587 /// Attempt to center the element in the scrollable area. |
1588 static const CENTER = const ScrollAlignment._internal('CENTER'); | 1588 static const CENTER = const ScrollAlignment._internal('CENTER'); |
1589 /// Attempt to align the element to the bottom of the scrollable area. | 1589 /// Attempt to align the element to the bottom of the scrollable area. |
1590 static const BOTTOM = const ScrollAlignment._internal('BOTTOM'); | 1590 static const BOTTOM = const ScrollAlignment._internal('BOTTOM'); |
1591 } | 1591 } |
OLD | NEW |