Chromium Code Reviews| 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 // Raw Element. | 8 // Raw Element. |
| 9 final Element _element; | 9 final Element _element; |
| 10 final HtmlCollection _childElements; | 10 final HtmlCollection _childElements; |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 253 * For standard elements it is more preferable to use the type constructors: | 253 * For standard elements it is more preferable to use the type constructors: |
| 254 * var element = new DivElement(); | 254 * var element = new DivElement(); |
| 255 * | 255 * |
| 256 * See also: | 256 * See also: |
| 257 * | 257 * |
| 258 * * [isTagSupported] | 258 * * [isTagSupported] |
| 259 */ | 259 */ |
| 260 factory $CLASSNAME.tag(String tag) => | 260 factory $CLASSNAME.tag(String tag) => |
| 261 _$(CLASSNAME)FactoryProvider.createElement_tag(tag); | 261 _$(CLASSNAME)FactoryProvider.createElement_tag(tag); |
| 262 | 262 |
| 263 /// Creates a new `<a>` element. | |
| 264 /// | |
| 265 /// This is identical to calling `new Element.tag(a)`. | |
|
blois
2013/06/28 20:07:59
nit: the tag name is missing quotes.
Andrei Mouravski
2013/06/28 20:31:18
Done.
| |
| 266 factory Element.a() => new Element.tag(a); | |
| 267 | |
| 268 /// Creates a new `<article>` element. | |
| 269 /// | |
| 270 /// This is identical to calling `new Element.tag(article)`. | |
| 271 factory Element.article() => new Element.tag(article); | |
| 272 | |
| 273 /// Creates a new `<aside>` element. | |
| 274 /// | |
| 275 /// This is identical to calling `new Element.tag(aside)`. | |
| 276 factory Element.aside() => new Element.tag(aside); | |
| 277 | |
| 278 /// Creates a new `<audio>` element. | |
| 279 /// | |
| 280 /// This is identical to calling `new Element.tag(audio)`. | |
| 281 factory Element.audio() => new Element.tag(audio); | |
| 282 | |
| 283 /// Creates a new `<br>` element. | |
| 284 /// | |
| 285 /// This is identical to calling `new Element.tag(br)`. | |
| 286 factory Element.br() => new Element.tag(br); | |
| 287 | |
| 288 /// Creates a new `<canvas>` element. | |
| 289 /// | |
| 290 /// This is identical to calling `new Element.tag(canvas)`. | |
| 291 factory Element.canvas() => new Element.tag(canvas); | |
| 292 | |
| 293 /// Creates a new `<div>` element. | |
| 294 /// | |
| 295 /// This is identical to calling `new Element.tag(div)`. | |
| 296 factory Element.div() => new Element.tag(div); | |
| 297 | |
| 298 /// Creates a new `<footer>` element. | |
| 299 /// | |
| 300 /// This is identical to calling `new Element.tag(footer)`. | |
| 301 factory Element.footer() => new Element.tag(footer); | |
| 302 | |
| 303 /// Creates a new `<header>` element. | |
| 304 /// | |
| 305 /// This is identical to calling `new Element.tag(header)`. | |
| 306 factory Element.header() => new Element.tag(header); | |
| 307 | |
| 308 /// Creates a new `<hr>` element. | |
| 309 /// | |
| 310 /// This is identical to calling `new Element.tag(hr)`. | |
| 311 factory Element.hr() => new Element.tag(hr); | |
| 312 | |
| 313 /// Creates a new `<iframe>` element. | |
| 314 /// | |
| 315 /// This is identical to calling `new Element.tag(iframe)`. | |
| 316 factory Element.iframe() => new Element.tag(iframe); | |
| 317 | |
| 318 /// Creates a new `<img>` element. | |
| 319 /// | |
| 320 /// This is identical to calling `new Element.tag(img)`. | |
| 321 factory Element.img() => new Element.tag(img); | |
| 322 | |
| 323 /// Creates a new `<li>` element. | |
| 324 /// | |
| 325 /// This is identical to calling `new Element.tag(li)`. | |
| 326 factory Element.li() => new Element.tag(li); | |
| 327 | |
| 328 /// Creates a new `<nav>` element. | |
| 329 /// | |
| 330 /// This is identical to calling `new Element.tag(nav)`. | |
| 331 factory Element.nav() => new Element.tag(nav); | |
| 332 | |
| 333 /// Creates a new `<ol>` element. | |
| 334 /// | |
| 335 /// This is identical to calling `new Element.tag(ol)`. | |
| 336 factory Element.ol() => new Element.tag(ol); | |
| 337 | |
| 338 /// Creates a new `<option>` element. | |
| 339 /// | |
| 340 /// This is identical to calling `new Element.tag(option)`. | |
| 341 factory Element.option() => new Element.tag(option); | |
| 342 | |
| 343 /// Creates a new `<p>` element. | |
| 344 /// | |
| 345 /// This is identical to calling `new Element.tag(p)`. | |
| 346 factory Element.p() => new Element.tag(p); | |
| 347 | |
| 348 /// Creates a new `<pre>` element. | |
| 349 /// | |
| 350 /// This is identical to calling `new Element.tag(pre)`. | |
| 351 factory Element.pre() => new Element.tag(pre); | |
| 352 | |
| 353 /// Creates a new `<section>` element. | |
| 354 /// | |
| 355 /// This is identical to calling `new Element.tag(section)`. | |
| 356 factory Element.section() => new Element.tag(section); | |
| 357 | |
| 358 /// Creates a new `<select>` element. | |
| 359 /// | |
| 360 /// This is identical to calling `new Element.tag(select)`. | |
| 361 factory Element.select() => new Element.tag(select); | |
| 362 | |
| 363 /// Creates a new `<span>` element. | |
| 364 /// | |
| 365 /// This is identical to calling `new Element.tag(span)`. | |
| 366 factory Element.span() => new Element.tag(span); | |
| 367 | |
| 368 /// Creates a new `<svg>` element. | |
| 369 /// | |
| 370 /// This is identical to calling `new Element.tag(svg)`. | |
| 371 factory Element.svg() => new Element.tag(svg); | |
| 372 | |
| 373 /// Creates a new `<table>` element. | |
| 374 /// | |
| 375 /// This is identical to calling `new Element.tag(table)`. | |
| 376 factory Element.table() => new Element.tag(table); | |
| 377 | |
| 378 /// Creates a new `<td>` element. | |
| 379 /// | |
| 380 /// This is identical to calling `new Element.tag(td)`. | |
| 381 factory Element.td() => new Element.tag(td); | |
| 382 | |
| 383 /// Creates a new `<textarea>` element. | |
| 384 /// | |
| 385 /// This is identical to calling `new Element.tag(textarea)`. | |
| 386 factory Element.textarea() => new Element.tag(textarea); | |
| 387 | |
| 388 /// Creates a new `<th>` element. | |
| 389 /// | |
| 390 /// This is identical to calling `new Element.tag(th)`. | |
| 391 factory Element.th() => new Element.tag(th); | |
| 392 | |
| 393 /// Creates a new `<tr>` element. | |
| 394 /// | |
| 395 /// This is identical to calling `new Element.tag(tr)`. | |
| 396 factory Element.tr() => new Element.tag(tr); | |
| 397 | |
| 398 /// Creates a new `<ul>` element. | |
| 399 /// | |
| 400 /// This is identical to calling `new Element.tag(ul)`. | |
| 401 factory Element.ul() => new Element.tag(ul); | |
| 402 | |
| 403 /// Creates a new `<video>` element. | |
| 404 /// | |
| 405 /// This is identical to calling `new Element.tag(video)`. | |
| 406 factory Element.video() => new Element.tag(video); | |
| 407 | |
| 263 /** | 408 /** |
| 264 * All attributes on this element. | 409 * All attributes on this element. |
| 265 * | 410 * |
| 266 * Any modifications to the attribute map will automatically be applied to | 411 * Any modifications to the attribute map will automatically be applied to |
| 267 * this element. | 412 * this element. |
| 268 * | 413 * |
| 269 * This only includes attributes which are not in a namespace | 414 * This only includes attributes which are not in a namespace |
| 270 * (such as 'xlink:href'), additional attributes can be accessed via | 415 * (such as 'xlink:href'), additional attributes can be accessed via |
| 271 * [getNamespacedAttributes]. | 416 * [getNamespacedAttributes]. |
| 272 */ | 417 */ |
| (...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 919 const ScrollAlignment._internal(this._value); | 1064 const ScrollAlignment._internal(this._value); |
| 920 toString() => 'ScrollAlignment.$_value'; | 1065 toString() => 'ScrollAlignment.$_value'; |
| 921 | 1066 |
| 922 /// Attempt to align the element to the top of the scrollable area. | 1067 /// Attempt to align the element to the top of the scrollable area. |
| 923 static const TOP = const ScrollAlignment._internal('TOP'); | 1068 static const TOP = const ScrollAlignment._internal('TOP'); |
| 924 /// Attempt to center the element in the scrollable area. | 1069 /// Attempt to center the element in the scrollable area. |
| 925 static const CENTER = const ScrollAlignment._internal('CENTER'); | 1070 static const CENTER = const ScrollAlignment._internal('CENTER'); |
| 926 /// Attempt to align the element to the bottom of the scrollable area. | 1071 /// Attempt to align the element to the bottom of the scrollable area. |
| 927 static const BOTTOM = const ScrollAlignment._internal('BOTTOM'); | 1072 static const BOTTOM = const ScrollAlignment._internal('BOTTOM'); |
| 928 } | 1073 } |
| OLD | NEW |