Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(364)

Side by Side Diff: pkg/custom_element/lib/custom_element.dart

Issue 217233002: minor fixes in custom_element so we can publish it. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | pkg/custom_element/pubspec.yaml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 /** 5 /**
6 * Custom DOM elements. 6 * Custom DOM elements.
7 * 7 *
8 * This library provides access to the Polymer project's 8 * This library provides access to the Polymer project's
9 * [Custom Elements] 9 * [Custom Elements]
10 * (http://www.polymer-project.org/platform/custom-elements.html) 10 * (http://www.polymer-project.org/platform/custom-elements.html)
11 * API, which lets you define your own elements. With custom elements, you 11 * API, which lets you define your own elements. With custom elements, you
12 * associate code with custom tag names, and then use those custom tag names 12 * associate code with custom tag names, and then use those custom tag names
13 * as you would any standard tag. For more information, see the 13 * as you would any standard tag. For more information, see the
14 * [Polymer.dart homepage](https://www.dartlang.org/polymer-dart/) and its 14 * [Polymer.dart homepage](https://www.dartlang.org/polymer-dart/) and its
15 * [custom element example] 15 * [custom element example]
16 * (https://www.dartlang.org/polymer-dart/#custom-elements). 16 * (https://www.dartlang.org/polymer-dart/#custom-elements).
17 */ 17 */
18 library custom_element; 18 library custom_element;
19 19
20 import 'dart:html';
20 import 'dart:async'; 21 import 'dart:async';
21 import 'dart:html';
22 import 'src/custom_tag_name.dart';
23 22
24 /** 23 /**
25 * *Deprecated* -- do not use. Extend [HtmlElement] and use 24 * *Deprecated* -- do not use. Extend [HtmlElement] and use
26 * [document.register] instead. If running on a browser without native 25 * [document.register] instead. If running on a browser without native
27 * document.register, you can add the polyfill script to your page: 26 * document.register, you can add the polyfill script to your page:
28 * 27 *
29 * <script src="packages/custom_element/custom-elements.debug.js"></script> 28 * <script src="packages/custom_element/custom-elements.debug.js"></script>
30 * 29 *
31 * You can also use "custom-elements.min.js" for the minified version. 30 * You can also use "custom-elements.min.js" for the minified version.
32 */ 31 */
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 // properties. 112 // properties.
114 @deprecated 113 @deprecated
115 String getAttribute(String name) => 114 String getAttribute(String name) =>
116 host.getAttribute(name); 115 host.getAttribute(name);
117 116
118 @deprecated 117 @deprecated
119 String getAttributeNS(String namespaceUri, String localName) => 118 String getAttributeNS(String namespaceUri, String localName) =>
120 host.getAttributeNS(namespaceUri, localName); 119 host.getAttributeNS(namespaceUri, localName);
121 120
122 @deprecated 121 @deprecated
123 String setAttributeNS( 122 void setAttributeNS(
Siggi Cherem (dart-lang) 2014/03/28 16:51:17 FYI - analyzer tests seem to report some but not a
124 String namespaceUri, String localName, String value) { 123 String namespaceUri, String localName, String value) {
125 host.setAttributeNS(namespaceUri, localName, value); 124 host.setAttributeNS(namespaceUri, localName, value);
126 } 125 }
127 126
128 @deprecated 127 @deprecated
129 void setAttribute(String name, String value) => 128 void setAttribute(String name, String value) =>
130 host.setAttribute(name, value); 129 host.setAttribute(name, value);
131 130
132 @deprecated 131 @deprecated
133 List<Node> get childNodes => host.childNodes; 132 List<Node> get childNodes => host.childNodes;
134 133
135 // TODO(jmesserly): this forwarding is temporary until Dart supports 134 // TODO(jmesserly): this forwarding is temporary until Dart supports
136 // subclassing Elements. 135 // subclassing Elements.
137 // TODO(jmesserly): we were missing the setter for title, are other things 136 // TODO(jmesserly): we were missing the setter for title, are other things
138 // missing setters? 137 // missing setters?
139 138
140 List<Node> get nodes => host.nodes; 139 List<Node> get nodes => host.nodes;
141 140
142 set nodes(Iterable<Node> value) { host.nodes = value; } 141 set nodes(Iterable<Node> value) { host.nodes = value; }
143 142
144 /** 143 /**
145 * Replaces this node with another node. 144 * Replaces this node with another node.
146 */ 145 */
147 Node replaceWith(Node otherNode) { host.replaceWith(otherNode); } 146 Node replaceWith(Node otherNode) => host.replaceWith(otherNode);
148 147
149 /** 148 /**
150 * Removes this node from the DOM. 149 * Removes this node from the DOM.
151 */ 150 */
152 void remove() => host.remove(); 151 void remove() => host.remove();
153 152
154 Node get nextNode => host.nextNode; 153 Node get nextNode => host.nextNode;
155 154
156 String get nodeName => host.nodeName; 155 String get nodeName => host.nodeName;
157 156
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 Stream<TouchEvent> get onTouchLeave => host.onTouchLeave; 485 Stream<TouchEvent> get onTouchLeave => host.onTouchLeave;
487 Stream<TouchEvent> get onTouchMove => host.onTouchMove; 486 Stream<TouchEvent> get onTouchMove => host.onTouchMove;
488 Stream<TouchEvent> get onTouchStart => host.onTouchStart; 487 Stream<TouchEvent> get onTouchStart => host.onTouchStart;
489 Stream<TransitionEvent> get onTransitionEnd => host.onTransitionEnd; 488 Stream<TransitionEvent> get onTransitionEnd => host.onTransitionEnd;
490 489
491 // TODO(sigmund): do the normal forwarding when dartbug.com/7919 is fixed. 490 // TODO(sigmund): do the normal forwarding when dartbug.com/7919 is fixed.
492 Stream<WheelEvent> get onMouseWheel { 491 Stream<WheelEvent> get onMouseWheel {
493 throw new UnsupportedError('onMouseWheel is not supported'); 492 throw new UnsupportedError('onMouseWheel is not supported');
494 } 493 }
495 } 494 }
OLDNEW
« no previous file with comments | « no previous file | pkg/custom_element/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698