src/main/java/com/machinezoo/pushmode/dom/DomElement.java
@NoDocs
	public DomElement toPoster() {
		if (!frozen)
			throw new IllegalStateException("Poster can be computed only from frozen DOM tree");
		DomContent[] newChildren = null;
		for (int i = 0; i < size; ++i) {
			DomContent child = children[i];
			if (child instanceof DomElement) {
				DomElement childPoster = ((DomElement)child).toPoster();
				if (childPoster != child) {
					if (newChildren == null) {
						newChildren = new DomContent[size];
						System.arraycopy(children, 0, newChildren, 0, i);
					}
					newChildren[i] = childPoster;
					continue;
				}
			}
			if (newChildren != null)
				newChildren[i] = child;
		}
		if (newChildren == null && listeners == null)
			return this;
		DomElement copy = new DomElement(tagname);
		copy.id = id;
		copy.key = key;
		copy.attributes = attributes;
		copy.size = size;
		copy.children = newChildren != null ? newChildren : children;
		copy.frozen = true;
		return copy;
	}
/*
	 * Create poster frame that is devoid of listeners.
	 */
Create poster frame that is devoid of listeners.
Create poster frame that is devoid of listeners .
@NoDocs
	public DomElement toPoster() {
		if (!frozen)
			throw new IllegalStateException("Poster can be computed only from frozen DOM tree");
		DomContent[] newChildren = null;
		for (int i = 0; i < size; ++i) {
			DomContent child = children[i];
			if (child instanceof DomElement) {
				DomElement childPoster = ((DomElement)child).toPoster();
				if (childPoster != child) {
					if (newChildren == null) {
						newChildren = new DomContent[size];
						System.arraycopy(children, 0, newChildren, 0, i);
					}
					newChildren[i] = childPoster;
					continue;
				}
			}
			if (newChildren != null)
				newChildren[i] = child;
		}
		if (newChildren == null && listeners == null)
			return this;
		DomElement copy = new DomElement(tagname);
		copy.id = id;
		copy.key = key;
		copy.attributes = attributes;
		copy.size = size;
		copy.children = newChildren != null ? newChildren : children;
		copy.frozen = true;
		return copy;
	}
@ NoDocs public DomElement toPoster ( ) { if ( ! frozen ) throw new IllegalStateException ( "Poster can be computed only from frozen DOM tree" ) ; DomContent [ ] newChildren = null ; for ( int i = 0 ; i < size ; ++ i ) { DomContent child = children [ i ] ; if ( child instanceof DomElement ) { DomElement childPoster = ( ( DomElement ) child ) . toPoster ( ) ; if ( childPoster != child ) { if ( newChildren == null ) { newChildren = new DomContent [ size ] ; System . arraycopy ( children , 0 , newChildren , 0 , i ) ; } newChildren [ i ] = childPoster ; continue ; } } if ( newChildren != null ) newChildren [ i ] = child ; } if ( newChildren == null && listeners == null ) return this ; DomElement copy = new DomElement ( tagname ) ; copy . id = id ; copy . key = key ; copy . attributes = attributes ; copy . size = size ; copy . children = newChildren != null ? newChildren : children ; copy . frozen = true ; return copy ; }
Create poster frame that is devoid of listeners.
Create poster frame that is devoid of listeners .