]>
git.immae.eu Git - perso/Immae/Projets/packagist/piedsjaloux-ckeditor-component.git/blob - sources/core/dom/nodelist.js
2 * @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
3 * For licensing, see LICENSE.md or http://ckeditor.com/license
7 * Represents a list of {@link CKEDITOR.dom.node} objects.
8 * It's a wrapper for native nodes list.
10 * var nodeList = CKEDITOR.document.getBody().getChildren();
11 * alert( nodeList.count() ); // number [0;N]
14 * @constructor Creates a document class instance.
15 * @param {Object} nativeList
17 CKEDITOR
.dom
.nodeList = function( nativeList
) {
21 CKEDITOR
.dom
.nodeList
.prototype = {
23 * Get count of nodes in this list.
32 * Get node from the list.
34 * @returns {CKEDITOR.dom.node}
36 getItem: function( index
) {
37 if ( index
< 0 || index
>= this.$.length
)
40 var $node
= this.$[ index
];
41 return $node
? new CKEDITOR
.dom
.node( $node
) : null;