note that this pushes the cur_element, but doesn't pop it.
        You'll need to do that
554369
def add_list(self, bl):
        
        # text:list doesn't like being a child of text:p
        if self.cur_element is None:
            self.add_text_frame()
        self.push_element()
        self.cur_element._text_box.append(bl.node)
        style = bl.style_name
        if style not in self._preso._styles_added:
            self._preso._styles_added[style] = 1
            content = bl.default_styles_root()[0]
            self._preso._auto_styles.append(content)
        self.cur_element = bl
593078
def push(self, style={}):
        """"""
        _style = {}
        for attr in style:
            if attr in self.cmds and not style[attr] in self.cmds[attr]:
                print 'WARNING: ESC/POS PRINTING: ignoring invalid value: '+utfstr(style[attr])+' for style: '+utfstr(attr)
            else:
                _style[attr] = self.enforce_type(attr, style[attr])
        self.stack.append(_style)
456894
private void popStackToClose(Token.EndTag endTag) {
        String elName = settings.normalizeTag(endTag.tagName);
        Element firstFound = null;

        for (int pos = stack.size() -1; pos >= 0; pos--) {
            Element next = stack.get(pos);
            if (next.nodeName().equals(elName)) {
                firstFound = next;
                break;
            }
        }
        if (firstFound == null)
            return; // not found, skip

        for (int pos = stack.size() -1; pos >= 0; pos--) {
            Element next = stack.get(pos);
            stack.remove(pos);
            if (next == firstFound)
                break;
        }
    }
1275313
function(cur, depth, context, callback, stop) {
        if(stop[0]) {
            return true;
        }
        if(depth === this.dimensionsList.length) {
            stop[0] = !callback(this._contextToObject(context), cloneDeep(cur));
            return stop[0];
        }
        var key;
        for(key in cur) {
            if(this._walkSettingsHelper(cur[key], depth+1, context.concat(key), callback, stop)) {
                return true;
            }
        }
    }
1153290
def advance(self, height, ignore_overflow=False):
        """"""
        if height <= self.remaining_height:
            self._self_cursor.grow(height)
        elif ignore_overflow:
            self._self_cursor.grow(float(self.remaining_height))
        else:
            raise ContainerOverflow(self.page.number)
520863
function (element) {
        if (element === null ||
            !element.tagName ||
            !element.childNodes) {
            throw {
                name: "StropheError",
                message: "Cannot queue non-DOMElement."
            };
        }

        this._data.push(element);
    }
356454
def push_line(self, line):
        
        self.lineno -= 1
        self._buffer.append(line + b'\n')
892415
function(element) {
    if (!(element && element.nodeType === 1)) {
      return;
    }
    var mouseHandlers = _mouseHandlers[element.zcClippingId];
    if (!(typeof mouseHandlers === "object" && mouseHandlers)) {
      return;
    }
    var key, val, mouseEvents = [ "move", "leave", "enter", "out", "over" ];
    for (var i = 0, len = mouseEvents.length; i < len; i++) {
      key = "mouse" + mouseEvents[i];
      val = mouseHandlers[key];
      if (typeof val === "function") {
        element.removeEventListener(key, val, false);
      }
    }
    delete _mouseHandlers[element.zcClippingId];
  }
1341735
def insert_element(self, vector, value, idx, name=''):
        
        instr = instructions.InsertElement(self.block, vector, value, idx,
                                           name=name)
        self._insert(instr)
        return instr
111628
private boolean clampPosition() {
        if (mPosition < 0) {
            mPosition = -1;
            return false;
        } else if (mPosition > mList.size()) { // TODO should this be >= instead of >
            mPosition = mList.size();
            return false;
        }
        return true;
    }
512218
protected function fixBlockElementSpacing()
    {
        if ($this->parser->isStartTag) {
            $this->parser->html = ltrim($this->parser->html);
        }
    }
466203
function handleMouseMove (e) {
                    if(enabled){
                        if (pushed) {
                            if(!axis || axis === 'x') {
                                $element[0].scrollLeft -= (-lastClientX + (lastClientX = e.clientX));
                            }
                            if(!axis || axis === 'y') {
                                $element[0].scrollTop -= (-lastClientY + (lastClientY = e.clientY));
                            }
                        }

                        e.preventDefault();
                    }
                }
697410
public void pushTransform() {
		predraw();
		
		FloatBuffer buffer;
		if (stackIndex >= stack.size()) {
			buffer = BufferUtils.createFloatBuffer(18);
			stack.add(buffer);
		} else {
			buffer = (FloatBuffer) stack.get(stackIndex);
		}
		
		GL.glGetFloat(SGL.GL_MODELVIEW_MATRIX, buffer);
		buffer.put(16, sx);
		buffer.put(17, sy);
		stackIndex++;
		
		postdraw();
	}
117134
public void pop(int element) {
    assert this.contains(element);
    int i = this.pos.get(element);
    this.pos.set(element, -1);
    int last = this.heap.back();
    this.heap.pop();
    int j = this.heap.size();
    if (i == j)
      return;
    assert i < j;
    this.pos.set(last, i);
    this.heap.set(i, last);
    this.up(last);
    this.down(last);
  }
1267787
def press(self, coordinate, success=None):
        """"""
        if isinstance(coordinate, WebElement):
            coordinate.click()
        else:
            self.get_element(coordinate).click()
        if success is not None:
            assert self.is_available(*success)
719319
int insert(Object caller, int version, bbBlock curr, int pos, int len)
    {
        assert mutation_in_progress(caller, version);
        // DEBUG: int amountMoved = 0;
        // DEBUG: int before = this._buf_limit;
        // DEBUG: assert _validate();
        // if there's room in the current block - just
        // move the "trailing" bytes down and we're done
        int neededSpace = len - curr.unusedBlockCapacity();
        if (neededSpace <= 0) {
            // we have all the space we need in the current block
            // DEBUG: amountMoved =
            insertInCurrOnly(caller, version, curr, pos, len);
        }
        else {
            // we'll need at least some additional space beyond the curr
            // block, see if there's room in the
            // next one, otherwise we'll make more (blocks)
            bbBlock next = null;
            if (curr._idx < this._next_block_position - 1) {
                // if there is another block
                next = this._blocks.get(curr._idx + 1);
            }
            if (next != null &&
                (neededSpace <= next.unusedBlockCapacity())
            ) {
                // with the addition of the free space in the following block we have enough
                // DEBUG: amountMoved =
                insertInCurrAndNext(caller, version, curr, pos, len, next);
            }
            else {
                // we'll have to make one or more new blocks
                // first figure out much will be in the first
                // and last blocks (i.e. ignoring the whole
                // blocks
                int lenNeededInLastAddedBlock = neededSpace % _blockSizeUpperLimit;
                int tailLen = curr.bytesAvailableToRead(pos);
                if (lenNeededInLastAddedBlock < tailLen) lenNeededInLastAddedBlock = tailLen;
                if (lenNeededInLastAddedBlock < neededSpace
                 && neededSpace < this._blockSizeUpperLimit) {
                    // if we need less than the largest block then we should
                    // make *one* block with all of the needed space
                    lenNeededInLastAddedBlock = neededSpace;
                }
                bbBlock newblock = insertMakeNewTailBlock(caller, version, curr, lenNeededInLastAddedBlock);
                // now see if the curr block and this newblock have enough
                // available space to do the job, and if there's some trailing
                // data from curr that will end up staying in curr
                if (len <= (curr.unusedBlockCapacity()
                           + newblock.unusedBlockCapacity())
                ) {
                    // insert this as a zero length block immediately  after _curr
                    // insertBlock also adjusts the trailing blocks idx values
                    insertBlock(newblock);
                    // now pretend we just have the "push into the next block" case
                    // DEBUG: amountMoved =
                    insertInCurrAndNext(caller, version, curr, pos, len, newblock);
                }
                else {
                    // and last we have the case of having to insert more than 1 block
                    // which means all of the trailing bytes in _curr move into the last
                    // block
                    // DEBUG: amountMoved =
                    insertAsManyBlocksAsNeeded(caller, version, curr, pos, len, newblock);
                }
            }
        }
        // DEBUG: if (this._buf_limit - before != len
        // DEBUG: || amountMoved != len) {
        // DEBUG: throw new BlockedBufferException("insert went wrong #1 !!!");
        // DEBUG: }
        assert _validate();
        return len;
    }
896991
def advance(self, length):
        """"""
        new_position = self._position + length
        if new_position < 0 or new_position > len(self._data):
            raise Exception('Invalid advance amount (%s) for cursor.  '
                            'Position=%s' % (length, new_position))
        self._position = new_position