SgmlPage.createDomDocumentFragment
Code IndexAdd Codota to your IDE (free)

Best code snippets using com.gargoylesoftware.htmlunit.SgmlPage.createDomDocumentFragment(Showing top 10 results out of 315)

  • Common ways to obtain SgmlPage
private void myMethod () {
SgmlPage s =
  • HtmlElement htmlElement;htmlElement.getPage()
  • DomNode domNode;domNode.getPage()
  • DomElement domElement;domElement.getPage()
  • AI code suggestions by Codota
}
origin: org.jvnet.hudson/htmlunit

/**
 * Creates a new document fragment.
 * @return a newly created document fragment
 */
public Object jsxFunction_createDocumentFragment() {
  final DomDocumentFragment fragment = getDomNodeOrDie().getPage().createDomDocumentFragment();
  final DocumentFragment node = new DocumentFragment();
  node.setParentScope(getParentScope());
  node.setPrototype(getPrototype(node.getClass()));
  node.setDomNode(fragment);
  return getScriptableFor(fragment);
}
origin: org.jvnet.hudson/htmlunit

/**
 * Transforms the node source applying the stylesheet given by the importStylesheet() function.
 * The owner document of the output node owns the returned document fragment.
 * @param source the node to be transformed
 * @param output This document is used to generate the output
 * @return the result of the transformation
 */
public DocumentFragment jsxFunction_transformToFragment(
    final Node source, final Object output) {
  final SgmlPage page = (SgmlPage) ((Document) output).getDomNodeOrDie();
  final DomDocumentFragment fragment = page.createDomDocumentFragment();
  final DocumentFragment rv = new DocumentFragment();
  rv.setPrototype(getPrototype(rv.getClass()));
  rv.setParentScope(getParentScope());
  rv.setDomNode(fragment);
  transform(source, fragment);
  return rv;
}
origin: org.jenkins-ci/htmlunit

/**
 * Adds a DOM node to the node.
 * @param childObject the node to add to this node
 * @return the newly added child node
 */
public Object jsxFunction_appendChild(final Object childObject) {
  Object appendedChild = null;
  if (childObject instanceof Node) {
    // Get XML node for the DOM node passed in
    final DomNode childDomNode = ((Node) childObject).getDomNodeOrDie();
    // Get the parent XML node that the child should be added to.
    final DomNode parentNode = getDomNodeOrDie();
    // Append the child to the parent node
    parentNode.appendChild(childDomNode);
    appendedChild = childObject;
    //if the parentNode has null parentNode in IE,
    //create a DocumentFragment to be the parentNode's parentNode.
    if (!(parentNode instanceof SgmlPage)
        && !(this instanceof DocumentFragment) && parentNode.getParentNode() == null
        && getBrowserVersion().isIE()) {
      final DomDocumentFragment fragment = parentNode.getPage().createDomDocumentFragment();
      fragment.appendChild(parentNode);
    }
  }
  return appendedChild;
}
origin: org.jvnet.hudson/htmlunit

final DomDocumentFragment fragment = page.createDomDocumentFragment();
final DocumentFragment node = new DocumentFragment();
node.setParentScope(getParentScope());
origin: org.jvnet.hudson/htmlunit

final DomDocumentFragment fragment = domNode.getPage().createDomDocumentFragment();
fragment.appendChild(domNode);
origin: org.jenkins-ci/htmlunit

/**
 * Creates a new document fragment.
 * @return a newly created document fragment
 */
public Object jsxFunction_createDocumentFragment() {
  final DomDocumentFragment fragment = getDomNodeOrDie().getPage().createDomDocumentFragment();
  final DocumentFragment node = new DocumentFragment();
  node.setParentScope(getParentScope());
  node.setPrototype(getPrototype(node.getClass()));
  node.setDomNode(fragment);
  return getScriptableFor(fragment);
}
origin: org.jenkins-ci/htmlunit

/**
 * Transforms the node source applying the stylesheet given by the importStylesheet() function.
 * The owner document of the output node owns the returned document fragment.
 * @param source the node to be transformed
 * @param output This document is used to generate the output
 * @return the result of the transformation
 */
public DocumentFragment jsxFunction_transformToFragment(
    final Node source, final Object output) {
  final SgmlPage page = (SgmlPage) ((Document) output).getDomNodeOrDie();
  final DomDocumentFragment fragment = page.createDomDocumentFragment();
  final DocumentFragment rv = new DocumentFragment();
  rv.setPrototype(getPrototype(rv.getClass()));
  rv.setParentScope(getParentScope());
  rv.setDomNode(fragment);
  transform(source, fragment);
  return rv;
}
origin: org.jvnet.hudson/htmlunit

/**
 * Adds a DOM node to the node.
 * @param childObject the node to add to this node
 * @return the newly added child node
 */
public Object jsxFunction_appendChild(final Object childObject) {
  Object appendedChild = null;
  if (childObject instanceof Node) {
    // Get XML node for the DOM node passed in
    final DomNode childDomNode = ((Node) childObject).getDomNodeOrDie();
    // Get the parent XML node that the child should be added to.
    final DomNode parentNode = getDomNodeOrDie();
    // Append the child to the parent node
    parentNode.appendChild(childDomNode);
    appendedChild = childObject;
    //if the parentNode has null parentNode in IE,
    //create a DocumentFragment to be the parentNode's parentNode.
    if (!(parentNode instanceof SgmlPage)
        && !(this instanceof DocumentFragment) && parentNode.getParentNode() == null
        && getBrowserVersion().isIE()) {
      final DomDocumentFragment fragment = parentNode.getPage().createDomDocumentFragment();
      fragment.appendChild(parentNode);
    }
  }
  return appendedChild;
}
origin: org.jenkins-ci/htmlunit

final DomDocumentFragment fragment = page.createDomDocumentFragment();
final DocumentFragment node = new DocumentFragment();
node.setParentScope(getParentScope());
origin: org.jenkins-ci/htmlunit

final DomDocumentFragment fragment = domNode.getPage().createDomDocumentFragment();
fragment.appendChild(domNode);
com.gargoylesoftware.htmlunitSgmlPagecreateDomDocumentFragment

Javadoc

Creates an empty DomDocumentFragment object.

Popular methods of SgmlPage

  • getWebClient
    Returns the WebClient that originally loaded this page.
  • addDomChangeListener
  • createElement
    Creates an element, the type of which depends on the specified tag name.
  • createElementNS
    Create a new Element with the given namespace and qualified name.
  • getDoctype
    Returns the document type.
  • getDocumentElement
    Returns the document element.
  • getEnclosingWindow
    Returns the window that this page is sitting inside.
  • getFirstChild
  • getWebResponse
  • hasCaseSensitiveTagNames
    Returns true if this page has case-sensitive tag names, false otherwise. In general, XML has case-se
  • asXml
  • getElementById
  • asXml,
  • getElementById,
  • getFirstByXPath,
  • getPageEncoding,
  • getScriptObject,
  • asText,
  • createAttribute,
  • createCDATASection,
  • createDocumentFragment

Popular classes and methods

  • setContentView (Activity)
  • findViewById (Activity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • Menu (java.awt)
  • BufferedImage (java.awt.image)
  • Thread (java.lang)
    A Thread is a concurrent unit of execution. It has its own call stack for methods being invoked, the
  • TimerTask (java.util)
    A task that can be scheduled for one-time or repeated execution by a Timer.
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • JCheckBox (javax.swing)
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec

For IntelliJ IDEA and
Android Studio

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)