/** * 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); }
/** * 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); }
/** * 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); }
/** * 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; }
/** * 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; }
/** * 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; }
final DomDocumentFragment fragment = page.createDomDocumentFragment(); final DocumentFragment node = new DocumentFragment(); node.setParentScope(getParentScope());
final DomDocumentFragment fragment = page.createDomDocumentFragment(); final DocumentFragment node = new DocumentFragment(); node.setParentScope(getParentScope());
final DomDocumentFragment fragment = page.createDomDocumentFragment(); final DocumentFragment node = new DocumentFragment(); node.setParentScope(getParentScope());
/** * 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; }
/** * 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; }
/** * 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; }
&& getBrowserVersion().hasFeature( BrowserVersionFeatures.JS_APPEND_CHILD_CREATE_DOCUMENT_FRAGMENT_PARENT_IF_PARENT_IS_NULL)) { final DomDocumentFragment fragment = parentNode.getPage().createDomDocumentFragment(); fragment.appendChild(parentNode);
final DomDocumentFragment fragment = domNode.getPage().createDomDocumentFragment(); fragment.appendChild(domNode);
final DomDocumentFragment fragment = domNode.getPage().createDomDocumentFragment(); fragment.appendChild(domNode);
final DomDocumentFragment fragment = domNode.getPage().createDomDocumentFragment(); fragment.appendChild(domNode);
.hasFeature(BrowserVersionFeatures. JS_APPEND_CHILD_CREATE_DOCUMENT_FRAGMENT_PARENT_IF_PARENT_IS_NULL)) { final DomDocumentFragment fragment = domNode.getPage().createDomDocumentFragment(); fragment.appendChild(domNode);