Index: trunk/parsers/wikidom/tests/hype/es.DocumentModel.test.js |
— | — | @@ -181,7 +181,8 @@ |
182 | 182 | /** |
183 | 183 | * Sample content data index. |
184 | 184 | * |
185 | | - * This is a node tree that describes each partition within the document's content data. |
| 185 | + * This is a node tree that describes each partition within the document's content data. This is |
| 186 | + * what is automatically built by the es.DocumentModel constructor. |
186 | 187 | */ |
187 | 188 | var tree = [ |
188 | 189 | new es.ParagraphModel( data[0], 3 ), |
Index: trunk/parsers/wikidom/lib/hype/models/es.DocumentModel.js |
— | — | @@ -496,7 +496,7 @@ |
497 | 497 | * @param {es.DocumentModelNode} node Node to get element object for |
498 | 498 | * @returns {Object|null} Element object |
499 | 499 | */ |
500 | | -es.DocumentModel.prototype.getElement = function( node ) { |
| 500 | +es.DocumentModel.prototype.getElementFromNode = function( node ) { |
501 | 501 | var offset = this.getOffsetFromNode( node ); |
502 | 502 | if ( offset !== false ) { |
503 | 503 | return this.data[offset]; |
— | — | @@ -511,7 +511,7 @@ |
512 | 512 | * @param {es.DocumentModelNode} node Node to get content data for |
513 | 513 | * @returns {Array|null} List of content and elements inside node or null if node is not found |
514 | 514 | */ |
515 | | -es.DocumentModel.prototype.getContent = function( node, range ) { |
| 515 | +es.DocumentModel.prototype.getContentFromNode = function( node, range ) { |
516 | 516 | if ( range ) { |
517 | 517 | range.normalize(); |
518 | 518 | } |
Index: trunk/parsers/wikidom/lib/hype/bases/es.DocumentModelNode.js |
— | — | @@ -154,7 +154,7 @@ |
155 | 155 | // Find root |
156 | 156 | var root = this.data ? this : ( this.root.data ? this.root : null ); |
157 | 157 | if ( root ) { |
158 | | - return root.getContent( this, range ); |
| 158 | + return root.getContentFromNode( this, range ); |
159 | 159 | } |
160 | 160 | return []; |
161 | 161 | }; |