Get ``HTMLFormElement`` object related to this node.
484398
def form(self) -> Optional['HTMLFormElement']:
        """"""
        if self.__form:
            return self.__form
        parent = self.parentNode
        while parent:
            if isinstance(parent, HTMLFormElement):
                return parent
            else:
                parent = parent.parentNode
        return None
494425
def elementInActiveFormattingElements(self, name):
        """"""

        for item in self.activeFormattingElements[::-1]:
            # Check for Marker first because if it's a Marker it doesn't have a
            # name attribute.
            if item == Marker:
                break
            elif item.name == name:
                return item
        return False
730034
function isNativeFormElement(element) {
    var /** @type {?} */ nodeName = element.nodeName.toLowerCase();
    return nodeName === 'input' ||
        nodeName === 'select' ||
        nodeName === 'button' ||
        nodeName === 'textarea';
}
757408
def getMiniHTML(self):
        '''
            
        '''
        from .Formatter import AdvancedHTMLMiniFormatter
        html = self.getHTML()
        formatter = AdvancedHTMLMiniFormatter(None) # Do not double-encode
        formatter.feed(html)
        return formatter.getHTML()
822735
static String getChildElementText(Element parent, String name) {
        // Get children
        List list = DomUtils.getChildElementsByName(parent, name);

        if (list.size() == 1) {
            Element child = (Element) list.get(0);

            StringBuffer buf = new StringBuffer();

            NodeList children = child.getChildNodes();
            for (int i = 0; i < children.getLength(); i++) {
                Node node = children.item(i);
                if (node.getNodeType() == Node.TEXT_NODE ||
                        node.getNodeType() == Node.CDATA_SECTION_NODE) {
                    Text text = (Text) node;
                    buf.append(text.getData().trim());
                }
            }

            return buf.toString();
        } else {
            return null;
        }
    }
749257
def control(self) -> Optional[HTMLElement]:
        """"""
        id = self.getAttribute('for')
        if id:
            if self.ownerDocument:
                return self.ownerDocument.getElementById(id)
            elif isinstance(id, str):
                from wdom.document import getElementById
                return getElementById(id)
            else:
                raise TypeError('"for" attribute must be string')
        return None
697715
function getElements(node, attr) {
  return Array.prototype.slice.call(node.querySelectorAll("[" + attr + "]"));
}
970415
def clone(self):
        '''
        
        '''
        return HtmlElement(self.tag, self.prefix, self.suffix, self.display,
                           self.margin_before, self.margin_after, self.padding,
                           self.whitespace)
1254628
def get_form(self, form_class=None):
        """"""
        form = super().get_form(form_class)

        if not getattr(form, 'helper', None):
            form.helper = FormHelper()
            form.helper.form_tag = False
        else:
            form.helper.form_tag = False
        return form
458963
function( elem ) {
		return elem.nodeType === 9 && elem.documentElement.nodeName !== "HTML" ||
			!!elem.ownerDocument && jQuery.isXMLDoc( elem.ownerDocument );
	}
1052104
private final void getFormFields(Node parent, Map<String, String> formfields) {
        String method = "getFormFields(Node parent, Map formfields)";
        if (logger.isDebugEnabled()) {
            logger.debug(enter(method));
        }
        NodeList children = parent.getChildNodes();
        for (int i = 0; i < children.getLength(); i++) {
            Node child = children.item(i);
            String tag = child.getNodeName();
            if ("input".equalsIgnoreCase(tag)) {
                NamedNodeMap attributes = child.getAttributes();
                Node typeNode = attributes.getNamedItem("type");
                String type = typeNode.getNodeValue();
                Node nameNode = attributes.getNamedItem("name");
                String name = nameNode.getNodeValue();
                Node valueNode = attributes.getNamedItem("value");
                String value = "";
                if (valueNode != null) {
                    value = valueNode.getNodeValue();
                }
                if ("hidden".equalsIgnoreCase(type) && value != null) {
                    if (logger.isDebugEnabled()) {
                        logger.debug(format("capturing hidden fields", name, value));
                    }
                    formfields.put(name, value);
                }
            }
            getFormFields(child, formfields);
        }
        if (logger.isDebugEnabled()) {
            logger.debug(exit(method));
        }
    }
775018
function ( obj ) {
		return obj.nodeName === "FORM" ? false : string.isNumber( obj.value || element.text( obj ) );
	}
716325
public String getXmlEditorHtmlEnd() throws JspException {

        StringBuffer result = new StringBuffer(16384);
        if (m_optionalElementPresent) {
            // disabled optional element(s) present, reset widgets to show help bubbles on optional form entries
            resetWidgetCollector();
        }
        try {
            // get all widgets from collector
            Iterator<String> i = getWidgetCollector().getWidgets().keySet().iterator();
            while (i.hasNext()) {
                // get the value of the widget
                String key = i.next();
                I_CmsXmlContentValue value = getWidgetCollector().getValues().get(key);
                I_CmsWidget widget = getWidgetCollector().getWidgets().get(key);
                result.append(widget.getDialogHtmlEnd(getCms(), this, (I_CmsWidgetParameter)value));

            }

            // add empty help text layer
            result.append("<div class=\"help\" id=\"helpText\" ");
            result.append("onmouseover=\"showHelpText();\" onmouseout=\"hideHelpText();\"></div>\n");

            // add empty element button layer
            result.append("<div class=\"xmlButtons\" id=\"xmlElementButtons\" ");
            result.append(
                "onmouseover=\"checkElementButtons(true);\" onmouseout=\"checkElementButtons(false);\"></div>\n");

            // return the HTML
            return result.toString();
        } catch (Exception e) {
            showErrorPage(e);
            return "";
        }
    }
1244740
def getElementsByTagName(start_node: ParentNode, tag: str) -> NodeList:
    """"""
    _tag = tag.upper()
    return getElementsBy(start_node, lambda node: node.tagName == _tag)
1064570
def getElementById(id: str) -> Optional[Node]:
    """"""
    elm = Element._elements_with_id.get(id)
    return elm
390150
private NodeImpl getContainingElement() {
        for (Node p = getParentNode(); p != null; p = p.getParentNode()) {
            if (p.getNodeType() == ELEMENT_NODE) {
                return (NodeImpl) p;
            }
        }
        return null;
    }
624953
function getScriptElementContents(el) {
  if (!isElement(el)) {
    throw new TypeError('Expected a DOM Node, got ' + common.unexpectedObjToString(el));
  }
  if (el.type !== 'text/ohm-js') {
    throw new Error('Expected a script tag with type="text/ohm-js", got ' + el);
  }
  return el.getAttribute('src') ? load(el.getAttribute('src')) : el.innerHTML;
}