| 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 implements NodeListWrapper { | 8 implements NodeListWrapper { |
| 9 // Raw Element. | 9 // Raw Element. |
| 10 final Element _element; | 10 final Element _element; |
| (...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 * | 395 * |
| 396 * This is similar to [Document.createElement]. | 396 * This is similar to [Document.createElement]. |
| 397 * [tag] should be a valid HTML tag name. If [tag] is an unknown tag then | 397 * [tag] should be a valid HTML tag name. If [tag] is an unknown tag then |
| 398 * this will create an [UnknownElement]. | 398 * this will create an [UnknownElement]. |
| 399 * | 399 * |
| 400 * var divElement = new Element.tag('div'); | 400 * var divElement = new Element.tag('div'); |
| 401 * print(divElement is DivElement); // 'true' | 401 * print(divElement is DivElement); // 'true' |
| 402 * var myElement = new Element.tag('unknownTag'); | 402 * var myElement = new Element.tag('unknownTag'); |
| 403 * print(myElement is UnknownElement); // 'true' | 403 * print(myElement is UnknownElement); // 'true' |
| 404 * | 404 * |
| 405 * For standard elements it is better to use the element type constructors: | 405 * For standard elements it is more preferable to use the type constructors: |
| 406 * | |
| 407 * var element = new DivElement(); | 406 * var element = new DivElement(); |
| 408 * | 407 * |
| 409 * It is better to use e.g `new CanvasElement()` because the type of the | |
| 410 * expression is `CanvasElement`, whereas the type of `Element.tag` is the | |
| 411 * less specific `Element`. | |
| 412 * | |
| 413 * See also: | 408 * See also: |
| 414 * | 409 * |
| 415 * * [isTagSupported] | 410 * * [isTagSupported] |
| 416 */ | 411 */ |
| 417 factory $CLASSNAME.tag(String tag, [String typeExtention]) => | 412 factory $CLASSNAME.tag(String tag, [String typeExtention]) => |
| 418 _$(CLASSNAME)FactoryProvider.createElement_tag(tag, typeExtention); | 413 _$(CLASSNAME)FactoryProvider.createElement_tag(tag, typeExtention); |
| 419 | 414 |
| 420 /// Creates a new `<a>` element. | 415 /// Creates a new `<a>` element. |
| 421 /// | 416 /// |
| 422 /// This is equivalent to calling `new Element.tag('a')`. | 417 /// This is identical to calling `new Element.tag('a')`. |
| 423 factory Element.a() => new AnchorElement(); | 418 factory Element.a() => new Element.tag('a'); |
| 424 | 419 |
| 425 /// Creates a new `<article>` element. | 420 /// Creates a new `<article>` element. |
| 426 /// | 421 /// |
| 427 /// This is equivalent to calling `new Element.tag('article')`. | 422 /// This is identical to calling `new Element.tag('article')`. |
| 428 factory Element.article() => new Element.tag('article'); | 423 factory Element.article() => new Element.tag('article'); |
| 429 | 424 |
| 430 /// Creates a new `<aside>` element. | 425 /// Creates a new `<aside>` element. |
| 431 /// | 426 /// |
| 432 /// This is equivalent to calling `new Element.tag('aside')`. | 427 /// This is identical to calling `new Element.tag('aside')`. |
| 433 factory Element.aside() => new Element.tag('aside'); | 428 factory Element.aside() => new Element.tag('aside'); |
| 434 | 429 |
| 435 /// Creates a new `<audio>` element. | 430 /// Creates a new `<audio>` element. |
| 436 /// | 431 /// |
| 437 /// This is equivalent to calling `new Element.tag('audio')`. | 432 /// This is identical to calling `new Element.tag('audio')`. |
| 438 factory Element.audio() => new Element.tag('audio'); | 433 factory Element.audio() => new Element.tag('audio'); |
| 439 | 434 |
| 440 /// Creates a new `<br>` element. | 435 /// Creates a new `<br>` element. |
| 441 /// | 436 /// |
| 442 /// This is equivalent to calling `new Element.tag('br')`. | 437 /// This is identical to calling `new Element.tag('br')`. |
| 443 factory Element.br() => new BRElement(); | 438 factory Element.br() => new Element.tag('br'); |
| 444 | 439 |
| 445 /// Creates a new `<canvas>` element. | 440 /// Creates a new `<canvas>` element. |
| 446 /// | 441 /// |
| 447 /// This is equivalent to calling `new Element.tag('canvas')`. | 442 /// This is identical to calling `new Element.tag('canvas')`. |
| 448 factory Element.canvas() => new CanvasElement(); | 443 factory Element.canvas() => new Element.tag('canvas'); |
| 449 | 444 |
| 450 /// Creates a new `<div>` element. | 445 /// Creates a new `<div>` element. |
| 451 /// | 446 /// |
| 452 /// This is equivalent to calling `new Element.tag('div')`. | 447 /// This is identical to calling `new Element.tag('div')`. |
| 453 factory Element.div() => new DivElement(); | 448 factory Element.div() => new Element.tag('div'); |
| 454 | 449 |
| 455 /// Creates a new `<footer>` element. | 450 /// Creates a new `<footer>` element. |
| 456 /// | 451 /// |
| 457 /// This is equivalent to calling `new Element.tag('footer')`. | 452 /// This is identical to calling `new Element.tag('footer')`. |
| 458 factory Element.footer() => new Element.tag('footer'); | 453 factory Element.footer() => new Element.tag('footer'); |
| 459 | 454 |
| 460 /// Creates a new `<header>` element. | 455 /// Creates a new `<header>` element. |
| 461 /// | 456 /// |
| 462 /// This is equivalent to calling `new Element.tag('header')`. | 457 /// This is identical to calling `new Element.tag('header')`. |
| 463 factory Element.header() => new Element.tag('header'); | 458 factory Element.header() => new Element.tag('header'); |
| 464 | 459 |
| 465 /// Creates a new `<hr>` element. | 460 /// Creates a new `<hr>` element. |
| 466 /// | 461 /// |
| 467 /// This is equivalent to calling `new Element.tag('hr')`. | 462 /// This is identical to calling `new Element.tag('hr')`. |
| 468 factory Element.hr() => new Element.tag('hr'); | 463 factory Element.hr() => new Element.tag('hr'); |
| 469 | 464 |
| 470 /// Creates a new `<iframe>` element. | 465 /// Creates a new `<iframe>` element. |
| 471 /// | 466 /// |
| 472 /// This is equivalent to calling `new Element.tag('iframe')`. | 467 /// This is identical to calling `new Element.tag('iframe')`. |
| 473 factory Element.iframe() => new Element.tag('iframe'); | 468 factory Element.iframe() => new Element.tag('iframe'); |
| 474 | 469 |
| 475 /// Creates a new `<img>` element. | 470 /// Creates a new `<img>` element. |
| 476 /// | 471 /// |
| 477 /// This is equivalent to calling `new Element.tag('img')`. | 472 /// This is identical to calling `new Element.tag('img')`. |
| 478 factory Element.img() => new Element.tag('img'); | 473 factory Element.img() => new Element.tag('img'); |
| 479 | 474 |
| 480 /// Creates a new `<li>` element. | 475 /// Creates a new `<li>` element. |
| 481 /// | 476 /// |
| 482 /// This is equivalent to calling `new Element.tag('li')`. | 477 /// This is identical to calling `new Element.tag('li')`. |
| 483 factory Element.li() => new Element.tag('li'); | 478 factory Element.li() => new Element.tag('li'); |
| 484 | 479 |
| 485 /// Creates a new `<nav>` element. | 480 /// Creates a new `<nav>` element. |
| 486 /// | 481 /// |
| 487 /// This is equivalent to calling `new Element.tag('nav')`. | 482 /// This is identical to calling `new Element.tag('nav')`. |
| 488 factory Element.nav() => new Element.tag('nav'); | 483 factory Element.nav() => new Element.tag('nav'); |
| 489 | 484 |
| 490 /// Creates a new `<ol>` element. | 485 /// Creates a new `<ol>` element. |
| 491 /// | 486 /// |
| 492 /// This is equivalent to calling `new Element.tag('ol')`. | 487 /// This is identical to calling `new Element.tag('ol')`. |
| 493 factory Element.ol() => new Element.tag('ol'); | 488 factory Element.ol() => new Element.tag('ol'); |
| 494 | 489 |
| 495 /// Creates a new `<option>` element. | 490 /// Creates a new `<option>` element. |
| 496 /// | 491 /// |
| 497 /// This is equivalent to calling `new Element.tag('option')`. | 492 /// This is identical to calling `new Element.tag('option')`. |
| 498 factory Element.option() => new Element.tag('option'); | 493 factory Element.option() => new Element.tag('option'); |
| 499 | 494 |
| 500 /// Creates a new `<p>` element. | 495 /// Creates a new `<p>` element. |
| 501 /// | 496 /// |
| 502 /// This is equivalent to calling `new Element.tag('p')`. | 497 /// This is identical to calling `new Element.tag('p')`. |
| 503 factory Element.p() => new Element.tag('p'); | 498 factory Element.p() => new Element.tag('p'); |
| 504 | 499 |
| 505 /// Creates a new `<pre>` element. | 500 /// Creates a new `<pre>` element. |
| 506 /// | 501 /// |
| 507 /// This is equivalent to calling `new Element.tag('pre')`. | 502 /// This is identical to calling `new Element.tag('pre')`. |
| 508 factory Element.pre() => new Element.tag('pre'); | 503 factory Element.pre() => new Element.tag('pre'); |
| 509 | 504 |
| 510 /// Creates a new `<section>` element. | 505 /// Creates a new `<section>` element. |
| 511 /// | 506 /// |
| 512 /// This is equivalent to calling `new Element.tag('section')`. | 507 /// This is identical to calling `new Element.tag('section')`. |
| 513 factory Element.section() => new Element.tag('section'); | 508 factory Element.section() => new Element.tag('section'); |
| 514 | 509 |
| 515 /// Creates a new `<select>` element. | 510 /// Creates a new `<select>` element. |
| 516 /// | 511 /// |
| 517 /// This is equivalent to calling `new Element.tag('select')`. | 512 /// This is identical to calling `new Element.tag('select')`. |
| 518 factory Element.select() => new Element.tag('select'); | 513 factory Element.select() => new Element.tag('select'); |
| 519 | 514 |
| 520 /// Creates a new `<span>` element. | 515 /// Creates a new `<span>` element. |
| 521 /// | 516 /// |
| 522 /// This is equivalent to calling `new Element.tag('span')`. | 517 /// This is identical to calling `new Element.tag('span')`. |
| 523 factory Element.span() => new Element.tag('span'); | 518 factory Element.span() => new Element.tag('span'); |
| 524 | 519 |
| 525 /// Creates a new `<svg>` element. | 520 /// Creates a new `<svg>` element. |
| 526 /// | 521 /// |
| 527 /// This is equivalent to calling `new Element.tag('svg')`. | 522 /// This is identical to calling `new Element.tag('svg')`. |
| 528 factory Element.svg() => new Element.tag('svg'); | 523 factory Element.svg() => new Element.tag('svg'); |
| 529 | 524 |
| 530 /// Creates a new `<table>` element. | 525 /// Creates a new `<table>` element. |
| 531 /// | 526 /// |
| 532 /// This is equivalent to calling `new Element.tag('table')`. | 527 /// This is identical to calling `new Element.tag('table')`. |
| 533 factory Element.table() => new Element.tag('table'); | 528 factory Element.table() => new Element.tag('table'); |
| 534 | 529 |
| 535 /// Creates a new `<td>` element. | 530 /// Creates a new `<td>` element. |
| 536 /// | 531 /// |
| 537 /// This is equivalent to calling `new Element.tag('td')`. | 532 /// This is identical to calling `new Element.tag('td')`. |
| 538 factory Element.td() => new Element.tag('td'); | 533 factory Element.td() => new Element.tag('td'); |
| 539 | 534 |
| 540 /// Creates a new `<textarea>` element. | 535 /// Creates a new `<textarea>` element. |
| 541 /// | 536 /// |
| 542 /// This is equivalent to calling `new Element.tag('textarea')`. | 537 /// This is identical to calling `new Element.tag('textarea')`. |
| 543 factory Element.textarea() => new Element.tag('textarea'); | 538 factory Element.textarea() => new Element.tag('textarea'); |
| 544 | 539 |
| 545 /// Creates a new `<th>` element. | 540 /// Creates a new `<th>` element. |
| 546 /// | 541 /// |
| 547 /// This is equivalent to calling `new Element.tag('th')`. | 542 /// This is identical to calling `new Element.tag('th')`. |
| 548 factory Element.th() => new Element.tag('th'); | 543 factory Element.th() => new Element.tag('th'); |
| 549 | 544 |
| 550 /// Creates a new `<tr>` element. | 545 /// Creates a new `<tr>` element. |
| 551 /// | 546 /// |
| 552 /// This is equivalent to calling `new Element.tag('tr')`. | 547 /// This is identical to calling `new Element.tag('tr')`. |
| 553 factory Element.tr() => new Element.tag('tr'); | 548 factory Element.tr() => new Element.tag('tr'); |
| 554 | 549 |
| 555 /// Creates a new `<ul>` element. | 550 /// Creates a new `<ul>` element. |
| 556 /// | 551 /// |
| 557 /// This is equivalent to calling `new Element.tag('ul')`. | 552 /// This is identical to calling `new Element.tag('ul')`. |
| 558 factory Element.ul() => new Element.tag('ul'); | 553 factory Element.ul() => new Element.tag('ul'); |
| 559 | 554 |
| 560 /// Creates a new `<video>` element. | 555 /// Creates a new `<video>` element. |
| 561 /// | 556 /// |
| 562 /// This is equivalent to calling `new Element.tag('video')`. | 557 /// This is identical to calling `new Element.tag('video')`. |
| 563 factory Element.video() => new Element.tag('video'); | 558 factory Element.video() => new Element.tag('video'); |
| 564 | 559 |
| 565 /** | 560 /** |
| 566 * All attributes on this element. | 561 * All attributes on this element. |
| 567 * | 562 * |
| 568 * Any modifications to the attribute map will automatically be applied to | 563 * Any modifications to the attribute map will automatically be applied to |
| 569 * this element. | 564 * this element. |
| 570 * | 565 * |
| 571 * This only includes attributes which are not in a namespace | 566 * This only includes attributes which are not in a namespace |
| 572 * (such as 'xlink:href'), additional attributes can be accessed via | 567 * (such as 'xlink:href'), additional attributes can be accessed via |
| (...skipping 1101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1674 const ScrollAlignment._internal(this._value); | 1669 const ScrollAlignment._internal(this._value); |
| 1675 toString() => 'ScrollAlignment.$_value'; | 1670 toString() => 'ScrollAlignment.$_value'; |
| 1676 | 1671 |
| 1677 /// Attempt to align the element to the top of the scrollable area. | 1672 /// Attempt to align the element to the top of the scrollable area. |
| 1678 static const TOP = const ScrollAlignment._internal('TOP'); | 1673 static const TOP = const ScrollAlignment._internal('TOP'); |
| 1679 /// Attempt to center the element in the scrollable area. | 1674 /// Attempt to center the element in the scrollable area. |
| 1680 static const CENTER = const ScrollAlignment._internal('CENTER'); | 1675 static const CENTER = const ScrollAlignment._internal('CENTER'); |
| 1681 /// Attempt to align the element to the bottom of the scrollable area. | 1676 /// Attempt to align the element to the bottom of the scrollable area. |
| 1682 static const BOTTOM = const ScrollAlignment._internal('BOTTOM'); | 1677 static const BOTTOM = const ScrollAlignment._internal('BOTTOM'); |
| 1683 } | 1678 } |
| OLD | NEW |