// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // WARNING: Do not edit - generated code. // TODO(vsm): Eliminate this type. // Note, ElementList implements List (instead of List) so // that its implementing classes may be cast to Lists of more specific // type such as List. interface ElementList extends List { // TODO(jacobr): add element batch manipulation methods. ElementList filter(bool f(Element element)); ElementList getRange(int start, int length); Element get first(); // TODO(jacobr): add insertAt } /** * All your attribute manipulation needs in one place. * Extends the regular Map interface by automatically coercing non-string * values to strings. */ interface AttributeMap extends Map { void operator []=(String key, value); } /** * All your element measurement needs in one place */ interface ElementRect { // Relative to offsetParent ClientRect get client(); ClientRect get offset(); ClientRect get scroll(); // In global coords ClientRect get bounding(); // In global coords List get clientRects(); } interface NodeSelector { Element query(String selectors); List queryAll(String selectors); } $!COMMENT interface Element extends Node, NodeSelector default _$(ID)FactoryProvider { Element.html(String html); Element.tag(String tag); AttributeMap get attributes(); void set attributes(Map value); /** * @domName childElementCount, firstElementChild, lastElementChild, * children, Node.nodes.add */ ElementList get elements(); void set elements(Collection value); /** @domName className, classList */ Set get classes(); void set classes(Collection value); AttributeMap get dataAttributes(); void set dataAttributes(Map value); /** * @domName getClientRects, getBoundingClientRect, clientHeight, clientWidth, * clientTop, clientLeft, offsetHeight, offsetWidth, offsetTop, offsetLeft, * scrollHeight, scrollWidth, scrollTop, scrollLeft */ Future get rect(); /** @domName Window.getComputedStyle */ Future get computedStyle(); /** @domName Window.getComputedStyle */ Future getComputedStyle(String pseudoElement); Element clone(bool deep); Element get parent(); $!MEMBERS }