-
- ///
-
- isSpan: function() {
- return this.wlxmlNode.getTagName() === 'span';
- },
-
- containsBlock: function() {
- return this.children()
- .filter(function(child) {
- return child instanceof documentElement.DocumentNodeElement;
- })
- .some(function(child) {
- if(child.isBlock()) {
- return true;
- } else {
- return child.containsBlock();
- }
- });
- },
-
- prepend: function(param) {
- var element;
- if(param instanceof documentElement.DocumentElement) {
- element = param;
- } else {
- element = this.canvas.createElement(param);
- }
- if(element.dom) {
- this._container().prepend(element.dom);
- this.refreshPath();
- }
- return element;
- },
-
- childIndex: function(child) {
- var children = this.children(),
- toret = null;
- children.forEach(function(c, idx) {
- if(c.sameNode(child)) {
- toret = idx;
- return false;
- }
- });
- return toret;
- }