| 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 fcf3c0c9dfe970c497c3813bfbd7b1dca08a4297..7148bd74f2817fba25d8fc4348f60cbfff87f20a 100644
|
| --- a/tools/dom/templates/html/impl/impl_Element.darttemplate
|
| +++ b/tools/dom/templates/html/impl/impl_Element.darttemplate
|
| @@ -263,7 +263,15 @@ class _FrozenElementList extends ListBase
|
| implements ElementList, NodeListWrapper {
|
| final List<Node> _nodeList;
|
|
|
| +$if JSINTEROP
|
| + var dartClass_instance;
|
| +
|
| + _FrozenElementList._wrap(this._nodeList) {
|
| + this.dartClass_instance = this._nodeList;
|
| + }
|
| +$else
|
| _FrozenElementList._wrap(this._nodeList);
|
| +$endif
|
|
|
| int get length => _nodeList.length;
|
|
|
| @@ -572,7 +580,15 @@ $(ANNOTATIONS)$(NATIVESPEC)abstract class $CLASSNAME$EXTENDS$IMPLEMENTS {
|
| * element.style.background = 'red'; // Turns every child of body red.
|
| * }
|
| */
|
| +$if DART2JS
|
| + List<Element> get children => new _ChildrenElementList._wrap(this);
|
| +$else
|
| + $if JSINTEROP
|
| + List<Element> get children => new FilteredElementList(this);
|
| + $else
|
| List<Element> get children => new _ChildrenElementList._wrap(this);
|
| + $endif
|
| +$endif
|
|
|
| void set children(List<Element> value) {
|
| // Copy list first since we don't want liveness during iteration.
|
| @@ -595,7 +611,11 @@ $(ANNOTATIONS)$(NATIVESPEC)abstract class $CLASSNAME$EXTENDS$IMPLEMENTS {
|
| */
|
| @DomName('Element.querySelectorAll')
|
| ElementList<Element> querySelectorAll(String selectors) =>
|
| +$if JSINTEROP
|
| + _querySelectorAll(selectors);
|
| +$else
|
| new _FrozenElementList._wrap(_querySelectorAll(selectors));
|
| +$endif
|
|
|
| /**
|
| * Alias for [querySelector]. Note this function is deprecated because its
|
| @@ -1487,61 +1507,119 @@ $if DART2JS
|
| int get scrollWidth => JS('num', '#.scrollWidth', this).round();
|
|
|
| $else
|
| + $if JSINTEROP
|
| + @DomName('Element.offsetHeight')
|
| + @DocsEditable()
|
| + int get offsetHeight => _blink.BlinkElement.instance.offsetHeight_Getter_(unwrap_jso(this)).round();
|
| +
|
| + @DomName('Element.offsetLeft')
|
| + @DocsEditable()
|
| + int get offsetLeft => _blink.BlinkElement.instance.offsetLeft_Getter_(unwrap_jso(this)).round();
|
| +
|
| + @DomName('Element.offsetTop')
|
| + @DocsEditable()
|
| + int get offsetTop => _blink.BlinkElement.instance.offsetTop_Getter_(unwrap_jso(this)).round();
|
| +
|
| + @DomName('Element.offsetWidth')
|
| + @DocsEditable()
|
| + int get offsetWidth => _blink.BlinkElement.instance.offsetWidth_Getter_(unwrap_jso(this)).round();
|
| +
|
| + @DomName('Element.clientHeight')
|
| + @DocsEditable()
|
| + int get clientHeight => _blink.BlinkElement.instance.clientHeight_Getter_(unwrap_jso(this)).round();
|
| +
|
| + @DomName('Element.clientLeft')
|
| + @DocsEditable()
|
| + int get clientLeft => _blink.BlinkElement.instance.clientLeft_Getter_(unwrap_jso(this)).round();
|
| +
|
| + @DomName('Element.clientTop')
|
| + @DocsEditable()
|
| + int get clientTop => _blink.BlinkElement.instance.clientTop_Getter_(unwrap_jso(this)).round();
|
| +
|
| + @DomName('Element.clientWidth')
|
| + @DocsEditable()
|
| + int get clientWidth => _blink.BlinkElement.instance.clientWidth_Getter_(unwrap_jso(this)).round();
|
| +
|
| + @DomName('Element.scrollHeight')
|
| + @DocsEditable()
|
| + int get scrollHeight => _blink.BlinkElement.instance.scrollHeight_Getter_(unwrap_jso(this)).round();
|
| +
|
| + @DomName('Element.scrollLeft')
|
| + @DocsEditable()
|
| + int get scrollLeft => _blink.BlinkElement.instance.scrollLeft_Getter_(unwrap_jso(this)).round();
|
| +
|
| + @DomName('Element.scrollLeft')
|
| + @DocsEditable()
|
| + void set scrollLeft(int value) => _blink.BlinkElement.instance.scrollLeft_Setter_(unwrap_jso(this), value.round());
|
| +
|
| + @DomName('Element.scrollTop')
|
| + @DocsEditable()
|
| + int get scrollTop => _blink.BlinkElement.instance.scrollTop_Getter_(unwrap_jso(this)).round();
|
| +
|
| + @DomName('Element.scrollTop')
|
| + @DocsEditable()
|
| + void set scrollTop(int value) => _blink.BlinkElement.instance.scrollTop_Setter_(unwrap_jso(this), value.round());
|
| +
|
| + @DomName('Element.scrollWidth')
|
| + @DocsEditable()
|
| + int get scrollWidth => _blink.BlinkElement.instance.scrollWidth_Getter_(unwrap_jso(this)).round();
|
| + $else
|
| @DomName('Element.offsetHeight')
|
| @DocsEditable()
|
| - int get offsetHeight => _blink.BlinkElement.offsetHeight_Getter(this).round();
|
| + int get offsetHeight => _blink.BlinkElement.offsetHeight_Getter_(this).round();
|
|
|
| @DomName('Element.offsetLeft')
|
| @DocsEditable()
|
| - int get offsetLeft => _blink.BlinkElement.offsetLeft_Getter(this).round();
|
| + int get offsetLeft => _blink.BlinkElement.offsetLeft_Getter_(this).round();
|
|
|
| @DomName('Element.offsetTop')
|
| @DocsEditable()
|
| - int get offsetTop => _blink.BlinkElement.offsetTop_Getter(this).round();
|
| + int get offsetTop => _blink.BlinkElement.offsetTop_Getter_(thi)).round();
|
|
|
| @DomName('Element.offsetWidth')
|
| @DocsEditable()
|
| - int get offsetWidth => _blink.BlinkElement.offsetWidth_Getter(this).round();
|
| + int get offsetWidth => _blink.BlinkElement.offsetWidth_Getter_(this).round();
|
|
|
| @DomName('Element.clientHeight')
|
| @DocsEditable()
|
| - int get clientHeight => _blink.BlinkElement.clientHeight_Getter(this).round();
|
| + int get clientHeight => _blink.BlinkElement.clientHeight_Getter_(this).round();
|
|
|
| @DomName('Element.clientLeft')
|
| @DocsEditable()
|
| - int get clientLeft => _blink.BlinkElement.clientLeft_Getter(this).round();
|
| + int get clientLeft => _blink.BlinkElement.clientLeft_Getter_(this).round();
|
|
|
| @DomName('Element.clientTop')
|
| @DocsEditable()
|
| - int get clientTop => _blink.BlinkElement.clientTop_Getter(this).round();
|
| + int get clientTop => _blink.BlinkElement.clientTop_Getter_(this).round();
|
|
|
| @DomName('Element.clientWidth')
|
| @DocsEditable()
|
| - int get clientWidth => _blink.BlinkElement.clientWidth_Getter(this).round();
|
| + int get clientWidth => _blink.BlinkElement.clientWidth_Getter_(this).round();
|
|
|
| @DomName('Element.scrollHeight')
|
| @DocsEditable()
|
| - int get scrollHeight => _blink.BlinkElement.scrollHeight_Getter(this).round();
|
| + int get scrollHeight => _blink.BlinkElement.scrollHeight_Getter_(this).round();
|
|
|
| @DomName('Element.scrollLeft')
|
| @DocsEditable()
|
| - int get scrollLeft => _blink.BlinkElement.scrollLeft_Getter(this).round();
|
| + int get scrollLeft => _blink.BlinkElement.scrollLeft_Getter_(this).round();
|
|
|
| @DomName('Element.scrollLeft')
|
| @DocsEditable()
|
| - void set scrollLeft(int value) => _blink.BlinkElement.scrollLeft_Setter(this, value.round());
|
| + void set scrollLeft(int value) => _blink.BlinkElement.scrollLeft_Setter_(this, value.round());
|
|
|
| @DomName('Element.scrollTop')
|
| @DocsEditable()
|
| - int get scrollTop => _blink.BlinkElement.scrollTop_Getter(this).round();
|
| + int get scrollTop => _blink.BlinkElement.scrollTop_Getter_(this).round();
|
|
|
| @DomName('Element.scrollTop')
|
| @DocsEditable()
|
| - void set scrollTop(int value) => _blink.BlinkElement.scrollTop_Setter(this, value.round());
|
| + void set scrollTop(int value) => _blink.BlinkElement.scrollTop_Setter_(this, value.round());
|
|
|
| @DomName('Element.scrollWidth')
|
| @DocsEditable()
|
| - int get scrollWidth => _blink.BlinkElement.scrollWidth_Getter(this).round();
|
| + int get scrollWidth => _blink.BlinkElement.scrollWidth_Getter_(this).round();
|
| + $endif
|
| $endif
|
|
|
| $!MEMBERS
|
|
|