/** * {@inheritDoc} */ @Override public DomElement createElementNS(final String namespaceURI, final String qualifiedName) { return new DomElement(namespaceURI, qualifiedName, this, new HashMap<String, DomAttr>()); }
/** * Creates a new XML element with the given namespace and qualified name. * * @param namespaceURI the URI that identifies an XML namespace * @param qualifiedName the qualified name of the element type to instantiate * @return the new XML element */ public DomElement createXmlElementNS(final String namespaceURI, final String qualifiedName) { return new DomElement(namespaceURI, qualifiedName, this, new HashMap<String, DomAttr>()); }
/** * {@inheritDoc} */ @Override public DomElement createElementNS(final String namespaceURI, final String qualifiedName) { return new DomElement(namespaceURI, qualifiedName, this, new HashMap<String, DomAttr>()); }
/** * Creates a new XML element with the given namespace and qualified name. * * @param namespaceURI the URI that identifies an XML namespace * @param qualifiedName the qualified name of the element type to instantiate * @return the new XML element */ public DomElement createXmlElementNS(final String namespaceURI, final String qualifiedName) { return new DomElement(namespaceURI, qualifiedName, this, new HashMap<String, DomAttr>()); }
/** * Creates a new XML element with the given namespace and qualified name. * * @param namespaceURI the URI that identifies an XML namespace * @param qualifiedName the qualified name of the element type to instantiate * @return the new XML element */ public DomElement createXmlElementNS(final String namespaceURI, final String qualifiedName) { return new DomElement(namespaceURI, qualifiedName, this, new HashMap<String, DomAttr>()); }
qualifiedName = source.getPrefix() + ':' + localName; return new DomElement(source.getNamespaceURI(), qualifiedName, page, attributes);
qualifiedName = source.getPrefix() + ':' + localName; return new DomElement(source.getNamespaceURI(), qualifiedName, page, attributes);
qualifiedName = source.getPrefix() + ':' + localName; return new DomElement(source.getNamespaceURI(), qualifiedName, page, attributes);
element = new DomElement(namespaceURI, qualifiedNameLC, page, attributeMap);
element = new DomElement(namespaceURI, qualifiedNameLC, page, attributeMap);
/** * Creates a new HTML element with the given tag name, and name. * @param namespaceURI the URI that identifies an XML namespace * @param qualifiedName the qualified name of the element type to instantiate * @return the new element or NOT_FOUND if the tag is not supported */ private Object createElementNS(final String namespaceURI, final String qualifiedName) { final org.w3c.dom.Element element; if ("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul".equals(namespaceURI)) { throw Context.reportRuntimeError("XUL not available"); } else if (HTMLParser.XHTML_NAMESPACE.equals(namespaceURI) || HTMLParser.SVG_NAMESPACE.equals(namespaceURI)) { element = getPage().createElementNS(namespaceURI, qualifiedName); } else { element = new DomElement(namespaceURI, qualifiedName, getPage(), null); } return getScriptableFor(element); }
/** * Creates a new HTML element with the given tag name, and name. * @param namespaceURI the URI that identifies an XML namespace * @param qualifiedName the qualified name of the element type to instantiate * @return the new element or NOT_FOUND if the tag is not supported */ private Object createElementNS(final String namespaceURI, final String qualifiedName) { final org.w3c.dom.Element element; if ("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul".equals(namespaceURI)) { throw Context.reportRuntimeError("XUL not available"); } else if (HTMLParser.XHTML_NAMESPACE.equals(namespaceURI) || HTMLParser.SVG_NAMESPACE.equals(namespaceURI)) { element = getPage().createElementNS(namespaceURI, qualifiedName); } else { element = new DomElement(namespaceURI, qualifiedName, getPage(), null); } return getScriptableFor(element); }
attributes.put(attribute.getNodeName(), xmlAttribute); return new DomElement(namespaceURI, qualifiedName, page, attributes);
/** * Creates a new HTML element with the given tag name, and name. * * @param namespaceURI the URI that identifies an XML namespace * @param qualifiedName the qualified name of the element type to instantiate * @return the new HTML element, or NOT_FOUND if the tag is not supported */ @JsxFunction public Object createElementNS(final String namespaceURI, final String qualifiedName) { final org.w3c.dom.Element element; if ("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul".equals(namespaceURI)) { throw Context.reportRuntimeError("XUL not available"); } if (HTMLParser.XHTML_NAMESPACE.equals(namespaceURI) || HTMLParser.SVG_NAMESPACE.equals(namespaceURI)) { element = getPage().createElementNS(namespaceURI, qualifiedName); } else { element = new DomElement(namespaceURI, qualifiedName, getPage(), null); } return getScriptableFor(element); }
/** * Creates a new HTML element with the given tag name, and name. * * @param namespaceURI the URI that identifies an XML namespace * @param qualifiedName the qualified name of the element type to instantiate * @return the new HTML element, or NOT_FOUND if the tag is not supported */ @JsxFunction public Object createElementNS(final String namespaceURI, final String qualifiedName) { final org.w3c.dom.Element element; if ("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul".equals(namespaceURI)) { throw Context.reportRuntimeError("XUL not available"); } if (HTMLParser.XHTML_NAMESPACE.equals(namespaceURI) || HTMLParser.SVG_NAMESPACE.equals(namespaceURI)) { element = getPage().createElementNS(namespaceURI, qualifiedName); } else { element = new DomElement(namespaceURI, qualifiedName, getPage(), null); } return getScriptableFor(element); }
attributes.put(attribute.getNodeName(), xmlAttribute); return new DomElement(namespaceURI, qualifiedName, page, attributes);
/** * Creates a new HTML element with the given tag name, and name. * * @param namespaceURI the URI that identifies an XML namespace * @param qualifiedName the qualified name of the element type to instantiate * @return the new HTML element, or NOT_FOUND if the tag is not supported */ public Object jsxFunction_createElementNS(final String namespaceURI, final String qualifiedName) { final org.w3c.dom.Element element; if (getBrowserVersion().isFirefox() && "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul".equals(namespaceURI)) { // simple hack, no need to implement the XUL objects (at least in a first time) element = new HtmlDivision(namespaceURI, qualifiedName, getPage(), null); } else if (HTMLParser.XHTML_NAMESPACE.equals(namespaceURI)) { element = getPage().createElementNS(namespaceURI, qualifiedName); } else { element = new DomElement(namespaceURI, qualifiedName, getPage(), null); } return getScriptableFor(element); }
/** * Creates a new HTML element with the given tag name, and name. * * @param namespaceURI the URI that identifies an XML namespace * @param qualifiedName the qualified name of the element type to instantiate * @return the new HTML element, or NOT_FOUND if the tag is not supported */ public Object jsxFunction_createElementNS(final String namespaceURI, final String qualifiedName) { final org.w3c.dom.Element element; if (getBrowserVersion().isFirefox() && "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul".equals(namespaceURI)) { // simple hack, no need to implement the XUL objects (at least in a first time) element = new HtmlDivision(namespaceURI, qualifiedName, getPage(), null); } else if (HTMLParser.XHTML_NAMESPACE.equals(namespaceURI)) { element = getPage().createElementNS(namespaceURI, qualifiedName); } else { element = new DomElement(namespaceURI, qualifiedName, getPage(), null); } return getScriptableFor(element); }
/** * Creates a new HTML element with the given tag name, and name. * * @param namespaceURI the URI that identifies an XML namespace * @param qualifiedName the qualified name of the element type to instantiate * @return the new HTML element, or NOT_FOUND if the tag is not supported */ public Object jsxFunction_createElementNS(final String namespaceURI, final String qualifiedName) { final org.w3c.dom.Element element; if (getBrowserVersion().isFirefox() && "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul".equals(namespaceURI)) { // simple hack, no need to implement the XUL objects (at least in a first time) element = new HtmlDivision(namespaceURI, qualifiedName, getPage(), null); } else if (HTMLParser.XHTML_NAMESPACE.equals(namespaceURI)) { element = getPage().createElementNS(namespaceURI, qualifiedName); } else { element = new DomElement(namespaceURI, qualifiedName, getPage(), null); } return getScriptableFor(element); }