mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
This CL updates sky-box, sky-button, sky-checkbox, sky-input, and sky-radio to work in Dart. We don't have a data binding system yet, so there's a bit more plumbing in the code. This CL adds support for sky-element@attributes, which lets you specify which attributes your element supports. We use this information to synthesize getters and setters for those attributes and to dispatch to mumbleChanged methods when the attributes change. I've also wrapped the widgets demo itself in a sky-scrollable so the whole thing scrolls. R=eseidel@chromium.org Review URL: https://codereview.chromium.org/946813005
41 lines
1.4 KiB
Plaintext
41 lines
1.4 KiB
Plaintext
// Copyright 2015 The Chromium Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
[
|
|
CustomConstructor,
|
|
] interface Element : ParentNode {
|
|
readonly attribute DOMString tagName;
|
|
|
|
boolean hasAttribute(DOMString name);
|
|
[TreatReturnedNullStringAs=Null] DOMString getAttribute(DOMString name);
|
|
[CustomElementCallbacks, RaisesException] void setAttribute(DOMString name, optional DOMString? value);
|
|
[CustomElementCallbacks] void removeAttribute(DOMString name);
|
|
|
|
sequence<Attr> getAttributes();
|
|
|
|
readonly attribute ShadowRoot shadowRoot;
|
|
|
|
// TODO(abarth): Move to Node.
|
|
readonly attribute CSSStyleDeclaration style;
|
|
|
|
// TODO(abarth): Remove these when we implement more of the system.
|
|
[RaisesException] boolean matches(DOMString selectors);
|
|
void focus();
|
|
void blur();
|
|
attribute long tabIndex;
|
|
readonly attribute DOMTokenList classList;
|
|
[RaisesException] ShadowRoot ensureShadowRoot();
|
|
|
|
ClientRect getBoundingClientRect();
|
|
readonly attribute long offsetLeft;
|
|
readonly attribute long offsetTop;
|
|
readonly attribute long offsetWidth;
|
|
readonly attribute long offsetHeight;
|
|
readonly attribute Element offsetParent;
|
|
readonly attribute long clientLeft;
|
|
readonly attribute long clientTop;
|
|
readonly attribute long clientWidth;
|
|
readonly attribute long clientHeight;
|
|
};
|