Handles end_document events with +version+, +tag_directives+,
 and +implicit+ styling.

 See Psych::Handler#start_document
553347
def end_document implicit_end = !streaming?
      @last.implicit_end = implicit_end
      n = pop
      set_end_location(n)
      n
    end
476924
def handle_endtag(self, tag):
        """"""
        if tag.lower() in self.allowed_tag_whitelist:
            self.result += '</' + tag + '>'
        else:
            if self.render_unallowed_tags:
                self.result += '&lt;/' + cgi.escape(tag) + '&gt;'

        if tag == 'style' or tag == 'script':
            self.silent = False
852611
@Override
	public void endDocument() throws SAXException
	{
		for (int i = 0; i < commands.size(); ++i)
		{
			Command cmd = commands.elementAt(i);
			try
			{
				cmd.backtrack(references);
			}
			catch (Exception e)
			{
				throw new SAXException(Messages.getString("beans.0B")); //$NON-NLS-1$
			}
			// if(!backtracked)
			// throw new SAXException("Command " + cmd.getTagName() +
			// " is unresolved on second run() call.");
		}

		for (int i = 0; i < commands.size(); ++i)
		{
			Command cmd = commands.elementAt(i);
			result.add(cmd.getResultValue());
		}
	}
603272
def handle_endtag(self, tag):
        """"""
        if tag.lower() in self.allowed_tag_whitelist:
            if tag.lower() in ['ul', 'ol']:
                self.previous_type_lists = self.previous_type_lists[:-1]
                if tag.lower() == 'ol':
                    self.nb = self.previous_nbs[-1]
                    self.previous_nbs = self.previous_nbs[:-1]
                # we must remove any non-relevant spacing and end of
                # line before
                self.result = self.result.rstrip()
                self.result += '\n' + self.line_quotation
898945
protected void afterEndDocument() {
        depth = 0;
        final Set<StackState> state = scopeState.getFirst();
        if (state.contains(StackState.WROTE_MARKUP)
                && !state.contains(StackState.WROTE_DATA)) { // but not data
            try {
                final String indent = getLineSeparator() + StringUtils.repeat("  ", 0);
                final Characters indentEvent = xmlEventFactory.createCharacters(indent);
                wrappedWriter.add(indentEvent);
            } catch (Exception ignored) {
            }
        }
        scopeState.clear();
        scopeState.push(EnumSet.noneOf(StackState.class)); // start fresh
    }
361050
public void endDocument() throws org.xml.sax.SAXException
    {
        flushPending();
        if (m_doIndent && !m_isprevtext)
        {
            try
            {
            outputLineSep();
            }
            catch(IOException e)
            {
                throw new SAXException(e);
            }
        }

        flushWriter();
        
        if (m_tracer != null)
            super.fireEndDoc();
    }
1152023
def initialize_document(self, doc):
        ''' 

        '''
        for h in self._handlers:
            # TODO (havocp) we need to check the 'failed' flag on each handler
            # and build a composite error display. In develop mode, we want to
            # somehow get these errors to the client.
            h.modify_document(doc)
            if h.failed:
                log.error("Error running application handler %r: %s %s ", h, h.error, h.error_detail)

        if settings.perform_document_validation():
            doc.validate()
1188519
function documentLeave ( event, data ) {
            if ( event.type === "mouseout" && event.target.nodeName === "HTML" && event.relatedTarget === null ){
                eventEnd (event, data);
            }
        }
1354783
function start(document, transport) {
        _transport = transport;
        _document = document;
        // start listening to node changes
        _enableListeners();

        var rel = related();

        // send the current status of related docs.
        _transport.send(JSON.stringify({
            method: "DocumentRelated",
            related: rel
        }));
        // initialize stylesheets with current status for further notifications.
        CSS.stylesheets = rel.stylesheets;
    }
72708
def handle_endtag(self, tag):
        
        if tag in PARENT_ELEMENTS:
            self.current_parent_element['tag'] = ''
            self.current_parent_element['attrs'] = ''

        if tag == 'li':
            self.parsing_li = True
        if tag != 'br':
            self.cleaned_html += '</{}>'.format(tag)
338736
function stop(event) {
		if (window.document.all) { 
			event.keyCode = 0;
		}
		if (event.preventDefault) {
			event.preventDefault();
			event.stopPropagation();
		}
	}
75147
def _get_end_event(parser, tagName):
    """"""

    (event, node) = six.next(parser)

    if event != pulldom.END_ELEMENT or node.tagName != tagName:
        raise ParseError(
            'Expecting %s end tag, got %s %s' % (tagName, event, node.tagName))
981327
def handle_starttag(self, tagName, attributeList, isSelfClosing=False):
        '''
            
        '''
        tagName = tagName.lower()
        inTag = self._inTag

        if isSelfClosing is False and tagName in IMPLICIT_SELF_CLOSING_TAGS:
            isSelfClosing = True

        newTag = AdvancedTag(tagName, attributeList, isSelfClosing)
        if self.root is None:
            self.root = newTag
        elif len(inTag) > 0:
            inTag[-1].appendChild(newTag)
        else:
            raise MultipleRootNodeException()

        if self.inPreformatted is 0:
            newTag._indent = self._getIndent()

        if tagName in PREFORMATTED_TAGS:
            self.inPreformatted += 1

        if isSelfClosing is False:
            inTag.append(newTag)
            if tagName != INVISIBLE_ROOT_TAG:
                self.currentIndentLevel += 1
514058
public void endDocument() throws IOException {
        endChangesIfNecessary();
        ResponseWriter writer = getWrapped();
        /*
         * Because during a <script> writing an exception can occur we need to
         * make sure the wrapped response only writes one partial-response, but
         * also calls to end the document (so we can properly cleanup in the 
         * wrapped HtmlResponseWriter). See issue #3473.
         */
        if (!(writer instanceof PartialResponseWriter)) {
            writer.endElement("partial-response");
        }
        writer.endDocument();
    }
567337
def start_binding
      binding    = ''
      open_count = 1

      # scan until we reach a {{ or }}
      loop do
        binding << @html.scan_until(/(\{\{|\}\}|\n|\Z)/)

        match = @html[1]
        if match == '}}'
          # close
          open_count -= 1
          break if open_count == 0
        elsif match == '{{'
          # open more
          open_count += 1
        elsif match == "\n" || @html.eos?
          # Starting new tag, should be closed before this
          # or end of doc before closed binding
          raise_parse_error("unclosed binding: {#{binding.strip}")
        else
          #:nocov:
          fail 'should not reach here'
          #:nocov:
        end
      end

      binding = binding[0..-3]
      @handler.binding(binding) if @handler.respond_to?(:binding)
    end
979041
def end_element (self, tag):
        
        tag = tag.encode(self.encoding, "ignore")
        self.fd.write("</%s>" % tag)
273772
def run
      Jekyll.logger.debug "Rendering:", document.relative_path

      assign_pages!
      assign_current_document!
      assign_highlighter_options!
      assign_layout_data!

      Jekyll.logger.debug "Pre-Render Hooks:", document.relative_path
      document.trigger_hooks(:pre_render, payload)

      render_document
    end