Renders this object into the DOM node referenced by _inParentNode_.
If rendering into the document body element, appropriate styles will
be used to have it expand to fill the whole window.
514650
function(inParentNode) {
		// clean up render flags and memoizations
		this.teardownRender();
		// inParentNode can be a string id or a node reference
		var pn = enyo.dom.byId(inParentNode);
		if (pn == document.body) {
			this.setupBodyFitting();
		} else if (this.fit) {
			this.addClass("enyo-fit enyo-clip");
		}
		// generate our HTML
		pn.innerHTML = this.generateHtml();
		// post-rendering tasks
		this.rendered();
		// support method chaining
		return this;
	}
772222
function(rendered, manager, def) {
    // Actually put the rendered contents into the element.
    if (_.isString(rendered)) {
      // If no container is specified, we must replace the content.
      if (manager.noel) {
        rendered = $.parseHTML(rendered, true);

        // Remove extra root elements.
        this.$el.slice(1).remove();

        // Swap out the View on the first top level element to avoid
        // duplication.
        this.$el.replaceWith(rendered);

        // Don't delegate events here - we'll do that in resolve()
        this.setElement(rendered, false);
      } else {
        this.html(this.$el, rendered);
      }
    }

    // Resolve only after fetch and render have succeeded.
    def.resolveWith(this, [this]);
  }
589808
function (el, parentNode) {
                    // updates the text of the text node
                    update = function (newVal) {
                        node.nodeValue = "" + newVal;
                        teardownCheck(node.parentNode);
                    };

                    var parent = getParentNode(el, parentNode),
                        node = document.createTextNode(binding.value);

                    // When iterating through an Observe.List with no DOM
                    // elements containing the individual items, the parent
                    // is sometimes incorrect not the true parent of the
                    // source element. (#153)
                    if (el.parentNode !== parent) {
                        parent = el.parentNode;
                        parent.insertBefore(node, el);
                        parent.removeChild(el);
                    } else {
                        parent.insertBefore(node, el);
                        parent.removeChild(el);
                    }
                    setupTeardownOnDestroy(parent);
                }
1359646
def render(self, **kwargs):
        """"""
        for name, child in self._children.items():
            child.render(**kwargs)

        figure = self.get_root()
        assert isinstance(figure, Figure), ('You cannot render this Element '
                                            'if it is not in a Figure.')

        figure.script.add_child(Element(
            self._template.render(this=self, kwargs=kwargs)),
            name=self.get_name())
853572
function (val) {
                        // create the fragment, but don't hook it up
                        // we need to insert it into the document first
                        var frag = can.view.frag(val, parentNode),
                            // keep a reference to each node
                            newNodes = can.makeArray(frag.childNodes),
                            last = nodes ? nodes[nodes.length - 1] : span;

                        // Insert it in the `document` or `documentFragment`
                        if (last.nextSibling) {
                            last.parentNode.insertBefore(frag, last.nextSibling);
                        } else {
                            last.parentNode.appendChild(frag);
                        }
                        // nodes hasn't been set yet
                        if (!nodes) {
                            can.remove(can.$(span));
                            nodes = newNodes;
                            // set the teardown nodeList
                            nodeList = nodes;
                            can.view.registerNode(nodes);
                        } else {
                            // Update node Array's to point to new nodes
                            // and then remove the old nodes.
                            // It has to be in this order for Mootools
                            // and IE because somehow, after an element
                            // is removed from the DOM, it loses its
                            // expando values.
                            var nodesToRemove = can.makeArray(nodes);
                            can.view.replace(nodes, newNodes);
                            can.remove(can.$(nodesToRemove));
                        }
                    }
1091807
function() {
      
      /**
       * Main container 
       */
      this.element = inputEx.cn('div', {id: this.options.id });
      
      if(this.options.showHideColumnsDlg) {
         this.renderShowHideColumnsDlg();
      }

      // append it immediatly to the parent DOM element
      this.options.parentEl.appendChild(this.element);
      
   }
864678
def render(document)
      document['content'].each_with_object([]) do |node, result|
        result << find_renderer(node).render(node)
      end.join("\n")
    end
849971
def styleInheritedFromParent(node, style):
    
    parentNode = node.parentNode

    # return None if we reached the Document element
    if parentNode.nodeType == Node.DOCUMENT_NODE:
        return None

    # check styles first (they take precedence over presentation attributes)
    styles = _getStyle(parentNode)
    if style in styles:
        value = styles[style]
        if not value == 'inherit':
            return value

    # check attributes
    value = parentNode.getAttribute(style)
    if value not in ['', 'inherit']:
        return parentNode.getAttribute(style)

    # check the next parent recursively if we did not find a value yet
    return styleInheritedFromParent(parentNode, style)
797515
def render(self, content_state=None):
        
        if content_state is None:
            content_state = {}

        blocks = content_state.get('blocks', [])
        wrapper_state = WrapperState(self.block_map, blocks)
        document = DOM.create_element()
        entity_map = content_state.get('entityMap', {})
        min_depth = 0

        for block in blocks:
            depth = block['depth']
            elt = self.render_block(block, entity_map, wrapper_state)

            if depth > min_depth:
                min_depth = depth

            # At level 0, append the element to the document.
            if depth == 0:
                DOM.append_child(document, elt)

        # If there is no block at depth 0, we need to add the wrapper that contains the whole tree to the document.
        if min_depth > 0 and wrapper_state.stack.length() != 0:
            DOM.append_child(document, wrapper_state.stack.tail().elt)

        return DOM.render(document)
764807
def appendChild(self, child):
        '''
            
        '''

        # Associate parentNode of #child to this tag
        child.parentNode = self

        # Associate owner document to child and all children recursive
        ownerDocument = self.ownerDocument

        child.ownerDocument = ownerDocument
        for subChild in child.getAllChildNodes():
            subChild.ownerDocument = ownerDocument

        # Our tag cannot be self-closing if we have a child tag
        self.isSelfClosing = False

        # Append to both "children" and "blocks"
        self.children.append(child)
        self.blocks.append(child)
        return child
1025839
function(doc, nodes, selector, after) {
        var parent = module.exports.resolveParent(doc, selector);
        if (!parent) {
            //Try to create the parent recursively if necessary
            try {
                var parentToCreate = et.XML('<' + path.basename(selector) + '>'),
                    parentSelector = path.dirname(selector);

                this.graftXML(doc, [parentToCreate], parentSelector);
            } catch (e) {
                return false;
            }
            parent = module.exports.resolveParent(doc, selector);
            if (!parent) return false;
        }

        nodes.forEach(function (node) {
            // check if child is unique first
            if (uniqueChild(node, parent)) {
                var children = parent.getchildren();
                var insertIdx = after ? findInsertIdx(children, after) : children.length;

                //TODO: replace with parent.insert after the bug in ElementTree is fixed
                parent.getchildren().splice(insertIdx, 0, node);
            }
        });

        return true;
    }
61507
def render_node(self):
        
        self.content = self.node.nodelist.render(self.context)
1246614
function () {
            var node, sel, range;
            if (window.getSelection) {
                sel = window.getSelection();
                if (sel.rangeCount) {
                    range = sel.getRangeAt(0);
                    if (!range.collapsed) {
                        node = sel.anchorNode.parentNode;
                    }
                }
            } else if (document.selection) {
                node = document.selection.createRange().parentElement();
            }
            return node;
        }
902314
function(source) {
			var res,
				parent = this.parent,
				pos = $.inArray(this, parent.children),
				that = this;

			_assert(
				this.isPagingNode(),
				"replaceWith() currently requires a paging status node"
			);

			res = this.tree._callHook("nodeLoadChildren", this, source);
			res.done(function(data) {
				// New nodes are currently children of `this`.
				var children = that.children;
				// Prepend newly loaded child nodes to `this`
				// Move new children after self
				for (i = 0; i < children.length; i++) {
					children[i].parent = parent;
				}
				parent.children.splice.apply(
					parent.children,
					[pos + 1, 0].concat(children)
				);

				// Remove self
				that.children = null;
				that.remove();
				// Redraw new nodes
				parent.render();
				// TODO: set node.partload = false if this was tha last paging node?
				// parent.addPagingNode(false);
			}).fail(function() {
				that.setExpanded();
			});
			return res;
			// $.error("Not implemented: replaceWith()");
		}
23916
function () {

            var oIFrame = this.iframe,
                oParentNode;

            if (oIFrame) {
                oParentNode = this.element.parentNode;

                if (oParentNode != oIFrame.parentNode) {
                    this._addToParent(oParentNode, oIFrame);
                }
                oIFrame.style.display = "block";
            }
        }
1277049
function _renderMarkdown( htmlDoc ) {
    const replacements = {};

    // First turn all outputs into text so *<span class="or-output></span>* can be detected
    htmlDoc.find( '/root/form//span[contains(@class, "or-output")]' ).forEach( ( el, index ) => {
        const key = `---output-${index}`;
        const textNode = el.childNodes()[ 0 ].clone();
        replacements[ key ] = el.toString();
        textNode.text( key );
        el.replace( textNode );
        // Note that we end up in a situation where we likely have sibling text nodes...
    } );

    // Now render markdown
    htmlDoc.find( '/root/form//span[contains(@class, "question-label") or contains(@class, "or-hint")]' ).forEach( ( el, index ) => {
        let key;
        /**
         * Using text() is done because:
         * a) We are certain that these <span>s do not contain other elements, other than formatting/markdown <span>s.
         * b) This avoids the need to merge any sibling text nodes that could have been created in the previous step.
         *
         * Note that text() will convert &gt; to >
         */
        const original = el.text().replace( '<', '&lt;' ).replace( '>', '&gt;' );
        const rendered = markdown.toHtml( original );
        if ( original !== rendered ) {
            key = `$$$${index}`;
            replacements[ key ] = rendered;
            el.text( key );
        }
    } );

    // TODO: does this result in self-closing tags?
    let htmlStr = _docToString( htmlDoc );

    // Now replace the placeholders with the rendered HTML
    // in reverse order so outputs are done last
    Object.keys( replacements ).reverse().forEach( key => {
        const replacement = replacements[ key ];
        if ( replacement ) {
            htmlStr = htmlStr.replace( key, replacement );
        }
    } );

    return htmlStr;
}
905880
def render_children(node: Node, **child_args):
    """"""
    for xml_node in node.xml_node.children:
        child = render(xml_node, **child_args)
        node.add_child(child)