File indexing completed on 2024-05-26 11:44:57

0001 /* This file is part of the KDE libraries
0002     Copyright (C) 2005, 2006 Ian Reinhart Geiser <geiseri@kde.org>
0003     Copyright (C) 2005, 2006 Matt Broadstone <mbroadst@gmail.com>
0004     Copyright (C) 2005, 2006 Richard J. Moore <rich@kde.org>
0005     Copyright (C) 2005, 2006 Erik L. Bunce <kde@bunce.us>
0006 
0007     This library is free software; you can redistribute it and/or
0008     modify it under the terms of the GNU Library General Public
0009     License as published by the Free Software Foundation; either
0010     version 2 of the License, or (at your option) any later version.
0011 
0012     This library is distributed in the hope that it will be useful,
0013     but WITHOUT ANY WARRANTY; without even the implied warranty of
0014     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0015     Library General Public License for more details.
0016 
0017     You should have received a copy of the GNU Library General Public License
0018     along with this library; see the file COPYING.LIB.  If not, write to
0019     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
0020     Boston, MA 02110-1301, USA.
0021 */
0022 #include "dom.h"
0023 
0024 #include <QDomAttr>
0025 #include <QDebug>
0026 
0027 using namespace KJSEmbed;
0028 
0029 const KJS::ClassInfo DomNodeBinding::info = { "QDomNode", &ValueBinding::info, nullptr, nullptr };
0030 DomNodeBinding::DomNodeBinding(KJS::ExecState *exec, const QDomNode &value)
0031     : ValueBinding(exec, "QDomNode", value)
0032 {
0033     StaticBinding::publish(exec, this, DomNode::methods());
0034 }
0035 
0036 namespace DomNodeNS
0037 {
0038 START_VALUE_METHOD(nodeType, QDomNode)
0039 result = KJS::jsNumber((int)value.nodeType());
0040 END_VALUE_METHOD
0041 
0042 START_VALUE_METHOD(nodeName, QDomNode)
0043 result = KJS::jsString(value.nodeName());
0044 END_VALUE_METHOD
0045 
0046 START_VALUE_METHOD(nodeValue, QDomNode)
0047 result = KJS::jsString(value.nodeValue());
0048 END_VALUE_METHOD
0049 
0050 START_VALUE_METHOD(appendChild, QDomNode)
0051 QDomNode newNode = KJSEmbed::extractValue<QDomNode>(exec, args, 0);
0052 QDomNode node = value.appendChild(newNode);
0053 result = KJSEmbed::createValue(exec, "QDomNode", node);
0054 END_VALUE_METHOD
0055 
0056 START_VALUE_METHOD(attributes, QDomNode)
0057 QDomNamedNodeMap map = value.attributes();
0058 result = KJSEmbed::createValue(exec, "QDomNamedNodeMap", map);
0059 END_VALUE_METHOD
0060 
0061 START_VALUE_METHOD(childNodes, QDomNode)
0062 QDomNodeList nodes = value.childNodes();
0063 result = KJSEmbed::createValue(exec, "QDomNodeList", nodes);
0064 END_VALUE_METHOD
0065 
0066 START_VALUE_METHOD(clear, QDomNode)
0067 value.clear();
0068 END_VALUE_METHOD
0069 
0070 START_VALUE_METHOD(cloneNode, QDomNode)
0071 bool deep = KJSEmbed::extractBool(exec, args, 0, true);
0072 QDomNode node = value.cloneNode(deep);
0073 result = KJSEmbed::createValue(exec, "QDomNode", node);
0074 END_VALUE_METHOD
0075 
0076 START_VALUE_METHOD(firstChild, QDomNode)
0077 QDomNode node = value.firstChild();
0078 result = KJSEmbed::createValue(exec, "QDomNode", node);
0079 END_VALUE_METHOD
0080 
0081 START_VALUE_METHOD(firstChildElement, QDomNode)
0082 QString name = KJSEmbed::extractQString(exec, args, 0);
0083 QDomElement node = value.firstChildElement(name);
0084 result = KJSEmbed::createValue(exec, "QDomElement", node);
0085 END_VALUE_METHOD
0086 
0087 START_VALUE_METHOD(hasAttributes, QDomNode)
0088 result = KJS::jsBoolean(value.hasAttributes());
0089 END_VALUE_METHOD
0090 
0091 START_VALUE_METHOD(hasChildNodes, QDomNode)
0092 result = KJS::jsBoolean(value.hasChildNodes());
0093 END_VALUE_METHOD
0094 
0095 START_VALUE_METHOD(insertBefore, QDomNode)
0096 QDomNode first = KJSEmbed::extractValue<QDomNode>(exec, args, 0);
0097 QDomNode second = KJSEmbed::extractValue<QDomNode>(exec, args, 1);
0098 QDomNode node = value.insertBefore(first, second);
0099 result = KJSEmbed::createValue(exec, "QDomNode", node);
0100 END_VALUE_METHOD
0101 
0102 START_VALUE_METHOD(insertAfter, QDomNode)
0103 QDomNode first = KJSEmbed::extractValue<QDomNode>(exec, args, 0);
0104 QDomNode second = KJSEmbed::extractValue<QDomNode>(exec, args, 1);
0105 QDomNode node = value.insertAfter(first, second);
0106 result = KJSEmbed::createValue(exec, "QDomNode", node);
0107 END_VALUE_METHOD
0108 
0109 START_VALUE_METHOD(isAttr, QDomNode)
0110 result = KJS::jsBoolean(value.isAttr());
0111 END_VALUE_METHOD
0112 
0113 START_VALUE_METHOD(isCDATASection, QDomNode)
0114 result = KJS::jsBoolean(value.isCDATASection());
0115 END_VALUE_METHOD
0116 
0117 START_VALUE_METHOD(isCharacterData, QDomNode)
0118 result = KJS::jsBoolean(value.isCharacterData());
0119 END_VALUE_METHOD
0120 
0121 START_VALUE_METHOD(isComment, QDomNode)
0122 result = KJS::jsBoolean(value.isComment());
0123 END_VALUE_METHOD
0124 
0125 START_VALUE_METHOD(isDocument, QDomNode)
0126 result = KJS::jsBoolean(value.isDocument());
0127 END_VALUE_METHOD
0128 
0129 START_VALUE_METHOD(isDocumentFragment, QDomNode)
0130 result = KJS::jsBoolean(value.isDocumentFragment());
0131 END_VALUE_METHOD
0132 
0133 START_VALUE_METHOD(isDocumentType, QDomNode)
0134 result = KJS::jsBoolean(value.isDocumentType());
0135 END_VALUE_METHOD
0136 
0137 START_VALUE_METHOD(isElement, QDomNode)
0138 result = KJS::jsBoolean(value.isElement());
0139 END_VALUE_METHOD
0140 
0141 START_VALUE_METHOD(isEntity, QDomNode)
0142 result = KJS::jsBoolean(value.isEntity());
0143 END_VALUE_METHOD
0144 
0145 START_VALUE_METHOD(isEntityReference, QDomNode)
0146 result = KJS::jsBoolean(value.isEntityReference());
0147 END_VALUE_METHOD
0148 
0149 START_VALUE_METHOD(isNotation, QDomNode)
0150 result = KJS::jsBoolean(value.isNotation());
0151 END_VALUE_METHOD
0152 
0153 START_VALUE_METHOD(isNull, QDomNode)
0154 result = KJS::jsBoolean(value.isNull());
0155 END_VALUE_METHOD
0156 
0157 START_VALUE_METHOD(isProcessingInstruction, QDomNode)
0158 result = KJS::jsBoolean(value.isProcessingInstruction());
0159 END_VALUE_METHOD
0160 
0161 START_VALUE_METHOD(isSupported, QDomNode)
0162 QString arg0 = KJSEmbed::extractQString(exec, args, 0);
0163 QString arg1 = KJSEmbed::extractQString(exec, args, 1);
0164 result = KJS::jsBoolean(value.isSupported(arg0, arg1));
0165 END_VALUE_METHOD
0166 
0167 START_VALUE_METHOD(isText, QDomNode)
0168 result = KJS::jsBoolean(value.isText());
0169 END_VALUE_METHOD
0170 
0171 START_VALUE_METHOD(lastChild, QDomNode)
0172 QDomNode node = value.lastChild();
0173 result = KJSEmbed::createValue(exec, "QDomNode", node);
0174 END_VALUE_METHOD
0175 
0176 START_VALUE_METHOD(lastChildElement, QDomNode)
0177 QString arg0 = KJSEmbed::extractQString(exec, args, 0);
0178 QDomElement node = value.lastChildElement(arg0);
0179 result = KJSEmbed::createValue(exec, "QDomElement", node);
0180 END_VALUE_METHOD
0181 
0182 START_VALUE_METHOD(localName, QDomNode)
0183 result = KJS::jsString(value.localName());
0184 END_VALUE_METHOD
0185 
0186 START_VALUE_METHOD(namedItem, QDomNode)
0187 QString arg0 = KJSEmbed::extractQString(exec, args, 0);
0188 QDomNode node = value.namedItem(arg0);
0189 result = KJSEmbed::createValue(exec, "QDomNode", node);
0190 END_VALUE_METHOD
0191 
0192 START_VALUE_METHOD(namespaceURI, QDomNode)
0193 result = KJS::jsString(value.namespaceURI());
0194 END_VALUE_METHOD
0195 
0196 START_VALUE_METHOD(nextSibling, QDomNode)
0197 QDomNode node = value.nextSibling();
0198 result = KJSEmbed::createValue(exec, "QDomNode", node);
0199 END_VALUE_METHOD
0200 
0201 START_VALUE_METHOD(nextSiblingElement, QDomNode)
0202 QString arg0 = KJSEmbed::extractQString(exec, args, 0);
0203 QDomElement node = value.nextSiblingElement(arg0);
0204 result = KJSEmbed::createValue(exec, "QDomElement", node);
0205 END_VALUE_METHOD
0206 
0207 START_VALUE_METHOD(normalize, QDomNode)
0208 value.normalize();
0209 END_VALUE_METHOD
0210 
0211 START_VALUE_METHOD(ownerDocument, QDomNode)
0212 QDomDocument doc = value.ownerDocument();
0213 result = KJSEmbed::createValue(exec, "QDomDocument", doc);
0214 END_VALUE_METHOD
0215 
0216 START_VALUE_METHOD(parentNode, QDomNode)
0217 QDomNode parent = value.parentNode();
0218 result = KJSEmbed::createValue(exec, "QDomNode", parent);
0219 END_VALUE_METHOD
0220 
0221 START_VALUE_METHOD(prefix, QDomNode)
0222 result = KJS::jsString(value.prefix());
0223 END_VALUE_METHOD
0224 
0225 START_VALUE_METHOD(previousSibling, QDomNode)
0226 QDomNode node = value.previousSibling();
0227 result = KJSEmbed::createValue(exec, "QDomNode", node);
0228 END_VALUE_METHOD
0229 
0230 START_VALUE_METHOD(previousSiblingElement, QDomNode)
0231 QString arg0 = KJSEmbed::extractQString(exec, args, 0);
0232 QDomNode node = value.previousSiblingElement(arg0);
0233 result = KJSEmbed::createValue(exec, "QDomNode", node);
0234 END_VALUE_METHOD
0235 
0236 START_VALUE_METHOD(removeChild, QDomNode)
0237 QDomNode arg0 = KJSEmbed::extractValue<QDomNode>(exec, args, 0);
0238 QDomNode node = value.removeChild(arg0);
0239 result = KJSEmbed::createValue(exec, "QDomNode", node);
0240 END_VALUE_METHOD
0241 
0242 START_VALUE_METHOD(replaceChild, QDomNode)
0243 QDomNode arg0 = KJSEmbed::extractValue<QDomNode>(exec, args, 0);
0244 QDomNode arg1 = KJSEmbed::extractValue<QDomNode>(exec, args, 1);
0245 QDomNode node = value.replaceChild(arg0, arg1);
0246 result = KJSEmbed::createValue(exec, "QDomNode", node);
0247 END_VALUE_METHOD
0248 
0249 START_VALUE_METHOD(setPrefix, QDomNode)
0250 QString arg0 = KJSEmbed::extractQString(exec, args, 0);
0251 value.setPrefix(arg0);
0252 END_VALUE_METHOD
0253 
0254 START_VALUE_METHOD(setNodeValue, QDomNode)
0255 QString arg0 = KJSEmbed::extractQString(exec, args, 0);
0256 value.setNodeValue(arg0);
0257 END_VALUE_METHOD
0258 
0259 START_VALUE_METHOD(toAttr, QDomNode)
0260 QDomAttr attr = value.toAttr();
0261 result = KJSEmbed::createValue(exec, "QDomAttr", attr);
0262 END_VALUE_METHOD
0263 
0264 START_VALUE_METHOD(toElement, QDomNode)
0265 QDomElement elem = value.toElement();
0266 result = KJSEmbed::createValue(exec, "QDomElement", elem);
0267 END_VALUE_METHOD
0268 }
0269 
0270 START_METHOD_LUT(DomNode)
0271 {"appendChild", 1, KJS::DontDelete | KJS::ReadOnly, &DomNodeNS::appendChild},
0272 {"attributes", 0, KJS::DontDelete | KJS::ReadOnly, &DomNodeNS::attributes},
0273 {"childNodes", 0, KJS::DontDelete | KJS::ReadOnly, &DomNodeNS::childNodes},
0274 {"clear", 0, KJS::DontDelete | KJS::ReadOnly, &DomNodeNS::clear},
0275 {"cloneNode", 0, KJS::DontDelete | KJS::ReadOnly, &DomNodeNS::cloneNode},
0276 {"firstChild", 0, KJS::DontDelete | KJS::ReadOnly, &DomNodeNS::firstChild},
0277 {"firstChildElement", 1, KJS::DontDelete | KJS::ReadOnly, &DomNodeNS::firstChildElement},
0278 {"hasAttributes", 0, KJS::DontDelete | KJS::ReadOnly, &DomNodeNS::hasAttributes},
0279 {"hasChildNodes", 0, KJS::DontDelete | KJS::ReadOnly, &DomNodeNS::hasChildNodes},
0280 {"insertBefore", 2, KJS::DontDelete | KJS::ReadOnly, &DomNodeNS::insertBefore},
0281 {"insertAfter", 2, KJS::DontDelete | KJS::ReadOnly, &DomNodeNS::insertAfter},
0282 {"isAttr", 0, KJS::DontDelete | KJS::ReadOnly, &DomNodeNS::isAttr},
0283 {"isCDATASection", 0, KJS::DontDelete | KJS::ReadOnly, &DomNodeNS::isCDATASection},
0284 {"isCharacterData", 0, KJS::DontDelete | KJS::ReadOnly, &DomNodeNS::isCharacterData},
0285 {"isComment", 0, KJS::DontDelete | KJS::ReadOnly, &DomNodeNS::isComment},
0286 {"isDocument", 0, KJS::DontDelete | KJS::ReadOnly, &DomNodeNS::isDocument},
0287 {"isDocumentFragment", 0, KJS::DontDelete | KJS::ReadOnly, &DomNodeNS::isDocumentFragment},
0288 {"isDocumentType", 0, KJS::DontDelete | KJS::ReadOnly, &DomNodeNS::isDocumentType},
0289 {"isElement", 0, KJS::DontDelete | KJS::ReadOnly, &DomNodeNS::isElement},
0290 {"isEntity", 0, KJS::DontDelete | KJS::ReadOnly, &DomNodeNS::isEntity},
0291 {"isEntityReference", 0, KJS::DontDelete | KJS::ReadOnly, &DomNodeNS::isEntityReference},
0292 {"isNotation", 0, KJS::DontDelete | KJS::ReadOnly, &DomNodeNS::isNotation},
0293 {"isNull", 0, KJS::DontDelete | KJS::ReadOnly, &DomNodeNS::isNull},
0294 {"isProcessingInstruction", 0, KJS::DontDelete | KJS::ReadOnly, &DomNodeNS::isProcessingInstruction},
0295 {"isSupported", 2, KJS::DontDelete | KJS::ReadOnly, &DomNodeNS::isSupported},
0296 {"isText", 0, KJS::DontDelete | KJS::ReadOnly, &DomNodeNS::isText},
0297 {"lastChild", 0, KJS::DontDelete | KJS::ReadOnly, &DomNodeNS::lastChild},
0298 {"lastChildElement", 1, KJS::DontDelete | KJS::ReadOnly, &DomNodeNS::lastChildElement},
0299 {"localName", 0, KJS::DontDelete | KJS::ReadOnly, &DomNodeNS::localName},
0300 {"namedItem", 1, KJS::DontDelete | KJS::ReadOnly, &DomNodeNS::namedItem},
0301 {"namespaceURI", 0, KJS::DontDelete | KJS::ReadOnly, &DomNodeNS::namespaceURI},
0302 {"nextSibling", 0, KJS::DontDelete | KJS::ReadOnly, &DomNodeNS::nextSibling},
0303 {"nextSiblingElement", 1, KJS::DontDelete | KJS::ReadOnly, &DomNodeNS::nextSiblingElement},
0304 {"nodeType", 0, KJS::DontDelete | KJS::ReadOnly, &DomNodeNS::nodeType},
0305 {"nodeName", 0, KJS::DontDelete | KJS::ReadOnly, &DomNodeNS::nodeName},
0306 {"nodeValue", 0, KJS::DontDelete | KJS::ReadOnly, &DomNodeNS::nodeValue},
0307 {"normalize", 0, KJS::DontDelete | KJS::ReadOnly, &DomNodeNS::normalize},
0308 {"ownerDocument", 0, KJS::DontDelete | KJS::ReadOnly, &DomNodeNS::ownerDocument},
0309 {"parentNode", 0, KJS::DontDelete | KJS::ReadOnly, &DomNodeNS::parentNode},
0310 {"prefix", 0, KJS::DontDelete | KJS::ReadOnly, &DomNodeNS::prefix},
0311 {"previousSibling", 0, KJS::DontDelete | KJS::ReadOnly, &DomNodeNS::previousSibling},
0312 {"previousSiblingElement", 1, KJS::DontDelete | KJS::ReadOnly, &DomNodeNS::previousSiblingElement},
0313 {"removeChild", 1, KJS::DontDelete | KJS::ReadOnly, &DomNodeNS::removeChild},
0314 {"replaceChild", 2, KJS::DontDelete | KJS::ReadOnly, &DomNodeNS::replaceChild},
0315 {"setPrefix", 1, KJS::DontDelete | KJS::ReadOnly, &DomNodeNS::setPrefix},
0316 {"setNodeValue", 2, KJS::DontDelete | KJS::ReadOnly, &DomNodeNS::setNodeValue},
0317 {"toAttr", 0, KJS::DontDelete | KJS::ReadOnly, &DomNodeNS::toAttr},
0318 {"toElement", 0, KJS::DontDelete | KJS::ReadOnly, &DomNodeNS::toElement}
0319 END_METHOD_LUT
0320 
0321 START_ENUM_LUT(DomNode)
0322 {"ElementNode", QDomNode::ElementNode},
0323 {"AttributeNode", QDomNode::AttributeNode},
0324 {"TextNode", QDomNode::TextNode},
0325 {"CDATASectionNode", QDomNode::CDATASectionNode},
0326 {"EntityReferenceNode", QDomNode::EntityReferenceNode},
0327 {"EntityNode", QDomNode::EntityNode},
0328 {"ProcessingInstructionNode", QDomNode::ProcessingInstructionNode},
0329 {"CommentNode", QDomNode::CommentNode},
0330 {"DocumentNode", QDomNode::DocumentNode},
0331 {"DocumentTypeNode", QDomNode::DocumentTypeNode},
0332 {"DocumentFragmentNode", QDomNode::DocumentFragmentNode},
0333 {"NotationNode", QDomNode::NotationNode},
0334 {"BaseNode", QDomNode::BaseNode},
0335 {"CharacterDataNode", QDomNode::CharacterDataNode}
0336 END_ENUM_LUT
0337 
0338 NO_STATICS(DomNode)
0339 
0340 START_CTOR(DomNode, QDomNode, 0)
0341 return new KJSEmbed::DomNodeBinding(exec, QDomNode());
0342 END_CTOR
0343 
0344 const KJS::ClassInfo DomDocumentBinding::info = { "QDomDocument", &ValueBinding::info, nullptr, nullptr };
0345 DomDocumentBinding::DomDocumentBinding(KJS::ExecState *exec, const QDomDocument &value)
0346     : ValueBinding(exec, "QDomDocument", value)
0347 {
0348     StaticBinding::publish(exec, this, DomNode::methods());
0349     StaticBinding::publish(exec, this, DomDocument::methods());
0350 }
0351 
0352 namespace DomDocumentNS
0353 {
0354 QString parserErrorTemplate = "XML Parse error '%1' at %2,%3";
0355 
0356 START_VALUE_METHOD(setContent, QDomDocument)
0357 QString xml = KJSEmbed::extractQString(exec, args, 0);
0358 QString message;
0359 int row = 0;
0360 int col = 0;
0361 bool success = value.setContent(xml, &message, &row, &col);
0362 result = KJS::jsBoolean(success);
0363 if (!success)
0364 {
0365     KJS::throwError(exec, KJS::SyntaxError, parserErrorTemplate.arg(message).arg(row).arg(col));
0366 }
0367 END_VALUE_METHOD
0368 
0369 START_VALUE_METHOD(toString, QDomDocument)
0370 int indent = KJSEmbed::extractInt(exec, args, 0, 1);
0371 result = KJS::jsString(value.toString(indent));
0372 END_VALUE_METHOD
0373 
0374 START_VALUE_METHOD(documentElement, QDomDocument)
0375 QDomElement elem = value.documentElement();
0376 result = KJSEmbed::createValue(exec, "QDomElement", elem);
0377 END_VALUE_METHOD
0378 
0379 START_VALUE_METHOD(elementById, QDomDocument)
0380 QString id = KJSEmbed::extractQString(exec, args, 0);
0381 QDomElement elem = value.elementById(id);
0382 result = KJSEmbed::createValue(exec, "QDomElement", elem);
0383 END_VALUE_METHOD
0384 
0385 START_VALUE_METHOD(createAttribute, QDomDocument)
0386 QString name = KJSEmbed::extractQString(exec, args, 0);
0387 QDomAttr attr = value.createAttribute(name);
0388 result = KJSEmbed::createValue(exec, "QDomAttr", attr);
0389 END_VALUE_METHOD
0390 
0391 START_VALUE_METHOD(createAttributeNS, QDomDocument)
0392 QString nsURI = KJSEmbed::extractQString(exec, args, 0);
0393 QString qName = KJSEmbed::extractQString(exec, args, 1);
0394 QDomAttr attr = value.createAttributeNS(nsURI, qName);
0395 result = KJSEmbed::createValue(exec, "QDomAttr", attr);
0396 END_VALUE_METHOD
0397 
0398 START_VALUE_METHOD(createCDATASection, QDomDocument)
0399 QString cdatatxt = KJSEmbed::extractQString(exec, args, 0);
0400 QDomCDATASection  cdata = value.createCDATASection(cdatatxt);
0401 result = KJSEmbed::createValue(exec, "QDomCDATASection", cdata);
0402 END_VALUE_METHOD
0403 
0404 START_VALUE_METHOD(createComment, QDomDocument)
0405 QString commenttxt = KJSEmbed::extractQString(exec, args, 0);
0406 QDomComment comment = value.createComment(commenttxt);
0407 result = KJSEmbed::createValue(exec, "QDomComment", comment);
0408 END_VALUE_METHOD
0409 
0410 START_VALUE_METHOD(createDocumentFragment, QDomDocument)
0411 QDomDocumentFragment fragment = value.createDocumentFragment();
0412 result = KJSEmbed::createValue(exec, "QDomDocumentFragment", fragment);
0413 END_VALUE_METHOD
0414 
0415 START_VALUE_METHOD(createElement, QDomDocument)
0416 QString tagName = KJSEmbed::extractQString(exec, args, 0);
0417 QDomElement elem = value.createElement(tagName);
0418 result = KJSEmbed::createValue(exec, "QDomElement", elem);
0419 END_VALUE_METHOD
0420 
0421 START_VALUE_METHOD(createElementNS, QDomDocument)
0422 QString nsURI = KJSEmbed::extractQString(exec, args, 0);
0423 QString qName = KJSEmbed::extractQString(exec, args, 1);
0424 QDomElement elem = value.createElementNS(nsURI, qName);
0425 result = KJSEmbed::createValue(exec, "QDomElement", elem);
0426 END_VALUE_METHOD
0427 
0428 START_VALUE_METHOD(createEntityReference, QDomDocument)
0429 QString name = KJSEmbed::extractQString(exec, args, 0);
0430 QDomEntityReference ref = value.createEntityReference(name);
0431 result = KJSEmbed::createValue(exec, "QDomEntityReference", ref);
0432 END_VALUE_METHOD
0433 
0434 START_VALUE_METHOD(createProcessingInstruction, QDomDocument)
0435 QString target = KJSEmbed::extractQString(exec, args, 0);
0436 QString data = KJSEmbed::extractQString(exec, args, 1);
0437 QDomProcessingInstruction inst = value.createProcessingInstruction(target, data);
0438 result = KJSEmbed::createValue(exec, "QDomProcessingInstruction", inst);
0439 END_VALUE_METHOD
0440 
0441 START_VALUE_METHOD(createTextNode, QDomDocument)
0442 QString texttext = KJSEmbed::extractQString(exec, args, 0);
0443 QDomText text = value.createTextNode(texttext);
0444 result = KJSEmbed::createValue(exec, "QDomText", text);
0445 END_VALUE_METHOD
0446 
0447 START_VALUE_METHOD(importNode, QDomDocument)
0448 QDomNode import = KJSEmbed::extractValue<QDomNode>(exec, args, 0);
0449 bool deep = KJSEmbed::extractBool(exec, args, 1);
0450 QDomNode node = value.importNode(import, deep);
0451 result = KJSEmbed::createValue(exec, "QDomNode",  node);
0452 END_VALUE_METHOD
0453 
0454 }
0455 
0456 START_METHOD_LUT(DomDocument)
0457 {"setContent", 1, KJS::DontDelete | KJS::ReadOnly, &DomDocumentNS::setContent},
0458 {"toString", 0, KJS::DontDelete | KJS::ReadOnly, &DomDocumentNS::toString},
0459 {"documentElement", 0, KJS::DontDelete | KJS::ReadOnly, &DomDocumentNS::documentElement},
0460 {"elementById", 1, KJS::DontDelete | KJS::ReadOnly, &DomDocumentNS::elementById},
0461 {"createAttribute", 1, KJS::DontDelete | KJS::ReadOnly, &DomDocumentNS::createAttribute },
0462 {"createAttributeNS", 2, KJS::DontDelete | KJS::ReadOnly, &DomDocumentNS::createAttributeNS },
0463 {"createCDATASection", 0, KJS::DontDelete | KJS::ReadOnly, &DomDocumentNS::createCDATASection},
0464 {"createComment", 0, KJS::DontDelete | KJS::ReadOnly, &DomDocumentNS::createComment},
0465 {"createDocumentFragment", 0, KJS::DontDelete | KJS::ReadOnly, &DomDocumentNS::createDocumentFragment},
0466 {"createElement", 1, KJS::DontDelete | KJS::ReadOnly, &DomDocumentNS::createElement},
0467 {"createElementNS", 2, KJS::DontDelete | KJS::ReadOnly, &DomDocumentNS::createElementNS},
0468 {"createEntityReference", 1, KJS::DontDelete | KJS::ReadOnly, &DomDocumentNS::createEntityReference},
0469 {"createProcessingInstruction", 2, KJS::DontDelete | KJS::ReadOnly, &DomDocumentNS::createProcessingInstruction},
0470 {"createTextNode", 1, KJS::DontDelete | KJS::ReadOnly, &DomDocumentNS::createTextNode},
0471 {"importNode", 2, KJS::DontDelete | KJS::ReadOnly, &DomDocumentNS::importNode}
0472 END_METHOD_LUT
0473 
0474 NO_ENUMS(DomDocument)
0475 NO_STATICS(DomDocument)
0476 
0477 START_CTOR(DomDocument, QDomDocument, 1)
0478 QString name = KJSEmbed::extractQString(exec, args, 0);
0479 return new KJSEmbed::DomDocumentBinding(exec, QDomDocument(name));
0480 END_CTOR
0481 
0482 const KJS::ClassInfo DomElementBinding::info = { "QDomElement", &ValueBinding::info, nullptr, nullptr };
0483 DomElementBinding::DomElementBinding(KJS::ExecState *exec, const QDomElement &value)
0484     : ValueBinding(exec, "QDomElement", value)
0485 {
0486     StaticBinding::publish(exec, this, DomNode::methods());
0487     StaticBinding::publish(exec, this, DomElement::methods());
0488 }
0489 
0490 namespace DomElementNS
0491 {
0492 START_VALUE_METHOD(toString, QDomElement)
0493 result = KJS::jsString(value.text());
0494 END_VALUE_METHOD
0495 
0496 START_VALUE_METHOD(tagName, QDomElement)
0497 result = KJS::jsString(value.tagName());
0498 END_VALUE_METHOD
0499 
0500 START_VALUE_METHOD(setTagName, QDomElement)
0501 QString tag = KJSEmbed::extractQString(exec, args, 0);
0502 value.setTagName(tag);
0503 END_VALUE_METHOD
0504 
0505 START_VALUE_METHOD(attribute, QDomElement)
0506 QString tag = KJSEmbed::extractQString(exec, args, 0);
0507 QString defaultValue = KJSEmbed::extractQString(exec, args, 1, QString());
0508 result = KJS::jsString(value.attribute(tag, defaultValue));
0509 END_VALUE_METHOD
0510 
0511 START_VALUE_METHOD(setAttribute, QDomElement)
0512 QString tag = KJSEmbed::extractQString(exec, args, 0);
0513 QString newValue = KJSEmbed::extractQString(exec, args, 1);
0514 value.setAttribute(tag, newValue);
0515 END_VALUE_METHOD
0516 
0517 START_VALUE_METHOD(hasAttribute, QDomElement)
0518 QString attr = KJSEmbed::extractQString(exec, args, 0);
0519 result = KJS::jsBoolean(value.hasAttribute(attr));
0520 END_VALUE_METHOD
0521 
0522 START_VALUE_METHOD(removeAttribute, QDomElement)
0523 QString attr = KJSEmbed::extractQString(exec, args, 0);
0524 value.removeAttribute(attr);
0525 END_VALUE_METHOD
0526 
0527 START_VALUE_METHOD(setAttributeNS, QDomElement)
0528 QString ns = KJSEmbed::extractQString(exec, args, 0);
0529 QString attr = KJSEmbed::extractQString(exec, args, 1);
0530 QString val = KJSEmbed::extractQString(exec, args, 3);
0531 value.setAttributeNS(ns, attr, val);
0532 END_VALUE_METHOD
0533 
0534 START_VALUE_METHOD(attributeNS, QDomElement)
0535 QString nsURI = KJSEmbed::extractQString(exec, args, 0);
0536 QString localName = KJSEmbed::extractQString(exec, args, 1);
0537 QString defValue = KJSEmbed::extractQString(exec, args, 1, QString());
0538 result = KJS::jsString(value.attributeNS(nsURI, localName, defValue));
0539 END_VALUE_METHOD
0540 
0541 START_VALUE_METHOD(hasAttributeNS, QDomElement)
0542 QString ns = KJSEmbed::extractQString(exec, args, 0);
0543 QString attr = KJSEmbed::extractQString(exec, args, 1);
0544 result = KJS::jsBoolean(value.hasAttributeNS(ns, attr));
0545 END_VALUE_METHOD
0546 
0547 START_VALUE_METHOD(removeAttributeNS, QDomElement)
0548 QString ns = KJSEmbed::extractQString(exec, args, 0);
0549 QString attr = KJSEmbed::extractQString(exec, args, 1);
0550 value.removeAttributeNS(ns, attr);
0551 END_VALUE_METHOD
0552 
0553 START_VALUE_METHOD(elementsByTagName, QDomElement)
0554 QString name = KJSEmbed::extractQString(exec, args, 0);
0555 QDomNodeList nodes = value.elementsByTagName(name);
0556 result = KJSEmbed::createValue(exec, "QDomNodeList", nodes);
0557 END_VALUE_METHOD
0558 
0559 START_VALUE_METHOD(elementsByTagNameNS, QDomElement)
0560 QString ns = KJSEmbed::extractQString(exec, args, 0);
0561 QString name = KJSEmbed::extractQString(exec, args, 1);
0562 QDomNodeList nodes = value.elementsByTagNameNS(ns, name);
0563 result = KJSEmbed::createValue(exec, "QDomNodeList", nodes);
0564 END_VALUE_METHOD
0565 
0566 START_VALUE_METHOD(attributeNode, QDomElement)
0567 QString name = KJSEmbed::extractQString(exec, args, 0);
0568 QDomAttr attr = value.attributeNode(name);
0569 result = KJSEmbed::createValue(exec, "QDomAttr", attr);
0570 END_VALUE_METHOD
0571 
0572 START_VALUE_METHOD(attributeNodeNS, QDomElement)
0573 QString ns = KJSEmbed::extractQString(exec, args, 0);
0574 QString name = KJSEmbed::extractQString(exec, args, 1);
0575 QDomAttr attr = value.attributeNodeNS(ns, name);
0576 result = KJSEmbed::createValue(exec, "QDomAttr", attr);
0577 END_VALUE_METHOD
0578 
0579 START_VALUE_METHOD(removeAttributeNode, QDomElement)
0580 QDomAttr attr = KJSEmbed::extractValue<QDomAttr>(exec, args, 0);
0581 QDomAttr newAttr = value.removeAttributeNode(attr);
0582 result = KJSEmbed::createValue(exec, "QDomAttr", newAttr);
0583 END_VALUE_METHOD
0584 
0585 START_VALUE_METHOD(setAttributeNode, QDomElement)
0586 QDomAttr attr = KJSEmbed::extractValue<QDomAttr>(exec, args, 0);
0587 QDomAttr newAttr = value.setAttributeNode(attr);
0588 result = KJSEmbed::createValue(exec, "QDomAttr", newAttr);
0589 END_VALUE_METHOD
0590 
0591 START_VALUE_METHOD(setAttributeNodeNS, QDomElement)
0592 QDomAttr attr = KJSEmbed::extractValue<QDomAttr>(exec, args, 0);
0593 QDomAttr newAttr = value.setAttributeNodeNS(attr);
0594 result = KJSEmbed::createValue(exec, "QDomAttr", newAttr);
0595 END_VALUE_METHOD
0596 }
0597 
0598 NO_ENUMS(DomElement)
0599 NO_STATICS(DomElement)
0600 
0601 START_METHOD_LUT(DomElement)
0602 {"toString", 0, KJS::DontDelete | KJS::ReadOnly, &DomElementNS::toString},
0603 {"text", 0, KJS::DontDelete | KJS::ReadOnly, &DomElementNS::toString},
0604 {"tagName", 0, KJS::DontDelete | KJS::ReadOnly, &DomElementNS::tagName},
0605 {"setTagName", 1, KJS::DontDelete | KJS::ReadOnly, &DomElementNS::setTagName},
0606 {"setAttribute", 2, KJS::DontDelete | KJS::ReadOnly, &DomElementNS::setAttribute},
0607 {"attribute", 2, KJS::DontDelete | KJS::ReadOnly, &DomElementNS::attribute},
0608 {"hasAttribute", 1, KJS::DontDelete | KJS::ReadOnly, &DomElementNS::hasAttribute},
0609 {"removeAttribute", 1, KJS::DontDelete | KJS::ReadOnly, &DomElementNS::removeAttribute},
0610 {"setAttributeNS", 3, KJS::DontDelete | KJS::ReadOnly, &DomElementNS::setAttributeNS},
0611 {"attributeNS", 3, KJS::DontDelete | KJS::ReadOnly, &DomElementNS::attributeNS},
0612 {"hasAttributeNS", 2, KJS::DontDelete | KJS::ReadOnly, &DomElementNS::hasAttributeNS},
0613 {"removeAttributeNS", 2, KJS::DontDelete | KJS::ReadOnly, &DomElementNS::removeAttributeNS},
0614 {"elementsByTagName", 1, KJS::DontDelete | KJS::ReadOnly, &DomElementNS::elementsByTagName},
0615 {"elementsByTagNameNS", 2, KJS::DontDelete | KJS::ReadOnly, &DomElementNS::elementsByTagNameNS},
0616 {"attributeNode", 1, KJS::DontDelete | KJS::ReadOnly, &DomElementNS::attributeNode},
0617 {"attributeNodeNS", 2, KJS::DontDelete | KJS::ReadOnly, &DomElementNS::attributeNodeNS},
0618 {"removeAttributeNode", 1, KJS::DontDelete | KJS::ReadOnly, &DomElementNS::removeAttributeNode},
0619 {"setAttributeNode", 1, KJS::DontDelete | KJS::ReadOnly, &DomElementNS::setAttributeNode},
0620 {"setAttributeNodeNS", 1, KJS::DontDelete | KJS::ReadOnly, &DomElementNS::setAttributeNodeNS}
0621 END_METHOD_LUT
0622 
0623 START_CTOR(DomElement, QDomElement, 0)
0624 return new KJSEmbed::DomElementBinding(exec, QDomElement());
0625 END_CTOR
0626 
0627 const KJS::ClassInfo DomAttrBinding::info = { "QDomAttr", &ValueBinding::info, nullptr, nullptr };
0628 DomAttrBinding::DomAttrBinding(KJS::ExecState *exec, const QDomAttr &value)
0629     : ValueBinding(exec, "QDomAttr", value)
0630 {
0631     StaticBinding::publish(exec, this, DomNode::methods());
0632     StaticBinding::publish(exec, this, DomAttr::methods());
0633 }
0634 
0635 namespace AttrElementNS
0636 {
0637 START_VALUE_METHOD(name, QDomAttr)
0638 result = KJS::jsString(value.value());
0639 END_VALUE_METHOD
0640 
0641 START_VALUE_METHOD(specified, QDomAttr)
0642 result = KJS::jsBoolean(value.specified());
0643 END_VALUE_METHOD
0644 
0645 START_VALUE_METHOD(ownerElement, QDomAttr)
0646 QDomElement owner = value.ownerElement();
0647 result = KJSEmbed::createValue(exec, "QDomElement", owner);
0648 END_VALUE_METHOD
0649 
0650 START_VALUE_METHOD(value, QDomAttr)
0651 result = KJS::jsString(value.value());
0652 END_VALUE_METHOD
0653 
0654 START_VALUE_METHOD(setValue, QDomAttr)
0655 QString newValue = KJSEmbed::extractQString(exec, args, 0);
0656 value.setValue(newValue);
0657 END_VALUE_METHOD
0658 
0659 }
0660 
0661 NO_ENUMS(DomAttr)
0662 NO_STATICS(DomAttr)
0663 
0664 START_METHOD_LUT(DomAttr)
0665 {"name", 0, KJS::DontDelete | KJS::ReadOnly, &AttrElementNS::name},
0666 {"specified", 0, KJS::DontDelete | KJS::ReadOnly, &AttrElementNS::specified},
0667 {"ownerElement", 0, KJS::DontDelete | KJS::ReadOnly, &AttrElementNS::ownerElement},
0668 {"value", 0, KJS::DontDelete | KJS::ReadOnly, &AttrElementNS::value},
0669 {"setValue", 1, KJS::DontDelete | KJS::ReadOnly, &AttrElementNS::setValue}
0670 END_METHOD_LUT
0671 
0672 START_CTOR(DomAttr, QDomAttr, 0)
0673 return new KJSEmbed::DomAttrBinding(exec, QDomAttr());
0674 END_CTOR
0675 
0676 const KJS::ClassInfo DomNodeListBinding::info = { "QDomNodeList", &ValueBinding::info, nullptr, nullptr };
0677 DomNodeListBinding::DomNodeListBinding(KJS::ExecState *exec, const QDomNodeList &value)
0678     : ValueBinding(exec, "QDomNodeList", value)
0679 {
0680     StaticBinding::publish(exec, this, DomNodeList::methods());
0681 }
0682 
0683 namespace NodeListNS
0684 {
0685 START_VALUE_METHOD(count, QDomNodeList)
0686 result = KJS::jsNumber(value.count());
0687 END_VALUE_METHOD
0688 
0689 START_VALUE_METHOD(length, QDomNodeList)
0690 result = KJS::jsNumber(value.length());
0691 END_VALUE_METHOD
0692 
0693 START_VALUE_METHOD(item, QDomNodeList)
0694 int idx = KJSEmbed::extractInt(exec, args, 0);
0695 QDomNode node = value.item(idx);
0696 result = KJSEmbed::createValue(exec, "QDomNode", node);
0697 END_VALUE_METHOD
0698 
0699 }
0700 
0701 NO_ENUMS(DomNodeList)
0702 NO_STATICS(DomNodeList)
0703 
0704 START_METHOD_LUT(DomNodeList)
0705 {"count", 0, KJS::DontDelete | KJS::ReadOnly, &NodeListNS::count},
0706 {"length", 0, KJS::DontDelete | KJS::ReadOnly, &NodeListNS::length},
0707 {"item", 1, KJS::DontDelete | KJS::ReadOnly, &NodeListNS::item}
0708 END_METHOD_LUT
0709 
0710 START_CTOR(DomNodeList, QDomNodeList, 0)
0711 return new KJSEmbed::DomNodeListBinding(exec, QDomNodeList());
0712 END_CTOR
0713 
0714 const KJS::ClassInfo DomDocumentTypeBinding::info = { "QDomDocumentType", &ValueBinding::info, nullptr, nullptr };
0715 DomDocumentTypeBinding::DomDocumentTypeBinding(KJS::ExecState *exec, const QDomDocumentType &value)
0716     : ValueBinding(exec, "QDomDocumentType", value)
0717 {
0718     StaticBinding::publish(exec, this, DomNode::methods());
0719     StaticBinding::publish(exec, this, DomDocumentType::methods());
0720 }
0721 
0722 namespace DomDocumentTypeNS
0723 {
0724 START_VALUE_METHOD(internalSubset, QDomDocumentType)
0725 result = KJS::jsString(value.internalSubset());
0726 END_VALUE_METHOD
0727 
0728 START_VALUE_METHOD(name, QDomDocumentType)
0729 result = KJS::jsString(value.name());
0730 END_VALUE_METHOD
0731 
0732 START_VALUE_METHOD(publicId, QDomDocumentType)
0733 result = KJS::jsString(value.publicId());
0734 END_VALUE_METHOD
0735 
0736 START_VALUE_METHOD(systemId, QDomDocumentType)
0737 result = KJS::jsString(value.systemId());
0738 END_VALUE_METHOD
0739 
0740 START_VALUE_METHOD(entities, QDomDocumentType)
0741 result = KJSEmbed::createValue(exec, "QDomNamedNodeMap", value.entities());
0742 END_VALUE_METHOD
0743 
0744 START_VALUE_METHOD(notations, QDomDocumentType)
0745 result = KJSEmbed::createValue(exec, "QDomNamedNodeMap", value.notations());
0746 END_VALUE_METHOD
0747 }
0748 
0749 NO_ENUMS(DomDocumentType)
0750 NO_STATICS(DomDocumentType)
0751 
0752 START_METHOD_LUT(DomDocumentType)
0753 {"entities", 0, KJS::DontDelete | KJS::ReadOnly, &DomDocumentTypeNS::entities},
0754 {"notations", 0, KJS::DontDelete | KJS::ReadOnly, &DomDocumentTypeNS::notations},
0755 {"internalSubset", 0, KJS::DontDelete | KJS::ReadOnly, &DomDocumentTypeNS::internalSubset},
0756 {"name", 0, KJS::DontDelete | KJS::ReadOnly, &DomDocumentTypeNS::name},
0757 {"publicId", 0, KJS::DontDelete | KJS::ReadOnly, &DomDocumentTypeNS::publicId},
0758 {"systemId", 0, KJS::DontDelete | KJS::ReadOnly, &DomDocumentTypeNS::systemId}
0759 END_METHOD_LUT
0760 
0761 START_CTOR(DomDocumentType, QDomDocumentType, 0)
0762 return new KJSEmbed::DomDocumentTypeBinding(exec, QDomDocumentType());
0763 END_CTOR
0764 
0765 const KJS::ClassInfo DomNamedNodeMapBinding::info = { "QDomNamedNodeMap", &ValueBinding::info, nullptr, nullptr };
0766 DomNamedNodeMapBinding::DomNamedNodeMapBinding(KJS::ExecState *exec, const QDomNamedNodeMap &value)
0767     : ValueBinding(exec, "QDomNamedNodeMap", value)
0768 {
0769     StaticBinding::publish(exec, this, DomNamedNodeMap::methods());
0770 }
0771 
0772 namespace NamedNodeMapNS
0773 {
0774 START_VALUE_METHOD(contains, QDomNamedNodeMap)
0775 QString name = KJSEmbed::extractQString(exec, args, 0);
0776 result = KJS::jsBoolean(value.contains(name));
0777 END_VALUE_METHOD
0778 
0779 START_VALUE_METHOD(count, QDomNamedNodeMap)
0780 result = KJS::jsNumber(value.count());
0781 END_VALUE_METHOD
0782 
0783 START_VALUE_METHOD(item, QDomNamedNodeMap)
0784 int idx = KJSEmbed::extractInt(exec, args, 0);
0785 QDomNode node = value.item(idx);
0786 result = KJSEmbed::createValue(exec, "QDomNode", node);
0787 END_VALUE_METHOD
0788 
0789 START_VALUE_METHOD(length, QDomNamedNodeMap)
0790 result = KJS::jsNumber(value.length());
0791 END_VALUE_METHOD
0792 
0793 START_VALUE_METHOD(namedItem, QDomNamedNodeMap)
0794 QString name = KJSEmbed::extractQString(exec, args, 0);
0795 QDomNode node = value.namedItem(name);
0796 result = KJSEmbed::createValue(exec, "QDomNode", node);
0797 END_VALUE_METHOD
0798 
0799 START_VALUE_METHOD(namedItemNS, QDomNamedNodeMap)
0800 QString nsuri = KJSEmbed::extractQString(exec, args, 0);
0801 QString localName = KJSEmbed::extractQString(exec, args, 1);
0802 QDomNode node = value.namedItemNS(nsuri, localName);
0803 result = KJSEmbed::createValue(exec, "QDomNode", node);
0804 END_VALUE_METHOD
0805 
0806 START_VALUE_METHOD(removeNamedItem, QDomNamedNodeMap)
0807 QString name = KJSEmbed::extractQString(exec, args, 0);
0808 QDomNode node = value.removeNamedItem(name);
0809 result = KJSEmbed::createValue(exec, "QDomNode", node);
0810 END_VALUE_METHOD
0811 
0812 START_VALUE_METHOD(removeNamedItemNS, QDomNamedNodeMap)
0813 QString nsuri = KJSEmbed::extractQString(exec, args, 0);
0814 QString localName = KJSEmbed::extractQString(exec, args, 1);
0815 QDomNode node = value.removeNamedItemNS(nsuri, localName);
0816 result = KJSEmbed::createValue(exec, "QDomNode", node);
0817 END_VALUE_METHOD
0818 
0819 START_VALUE_METHOD(setNamedItem, QDomNamedNodeMap)
0820 QDomNode newNode = KJSEmbed::extractValue<QDomNode>(exec, args, 0);
0821 QDomNode node = value.setNamedItem(newNode);
0822 result = KJSEmbed::createValue(exec, "QDomNode", node);
0823 END_VALUE_METHOD
0824 
0825 START_VALUE_METHOD(setNamedItemNS, QDomNamedNodeMap)
0826 QDomNode newNode = KJSEmbed::extractValue<QDomNode>(exec, args, 0);
0827 QDomNode node = value.setNamedItemNS(newNode);
0828 result = KJSEmbed::createValue(exec, "QDomNode", node);
0829 END_VALUE_METHOD
0830 
0831 }
0832 
0833 NO_ENUMS(DomNamedNodeMap)
0834 NO_STATICS(DomNamedNodeMap)
0835 
0836 START_METHOD_LUT(DomNamedNodeMap)
0837 {"contains", 0, KJS::DontDelete | KJS::ReadOnly, &NamedNodeMapNS::contains},
0838 {"count", 0, KJS::DontDelete | KJS::ReadOnly, &NamedNodeMapNS::count},
0839 {"item", 1, KJS::DontDelete | KJS::ReadOnly, &NamedNodeMapNS::item},
0840 {"length", 0, KJS::DontDelete | KJS::ReadOnly, &NamedNodeMapNS::length},
0841 {"namedItem", 1, KJS::DontDelete | KJS::ReadOnly, &NamedNodeMapNS::namedItem},
0842 {"namedItemNS", 2, KJS::DontDelete | KJS::ReadOnly, &NamedNodeMapNS::namedItemNS},
0843 {"removeNamedItem", 1, KJS::DontDelete | KJS::ReadOnly, &NamedNodeMapNS::removeNamedItem},
0844 {"removeNamedItemNS", 2, KJS::DontDelete | KJS::ReadOnly, &NamedNodeMapNS::removeNamedItemNS},
0845 {"setNamedItem", 1, KJS::DontDelete | KJS::ReadOnly, &NamedNodeMapNS::setNamedItem},
0846 {"setNamedItemNS", 1, KJS::DontDelete | KJS::ReadOnly, &NamedNodeMapNS::setNamedItemNS}
0847 END_METHOD_LUT
0848 
0849 START_CTOR(DomNamedNodeMap, QDomNamedNodeMap, 0)
0850 return new KJSEmbed::DomNamedNodeMapBinding(exec, QDomNamedNodeMap());
0851 END_CTOR
0852 
0853 const KJS::ClassInfo DomTextBinding::info = { "QDomText", &ValueBinding::info, nullptr, nullptr };
0854 DomTextBinding::DomTextBinding(KJS::ExecState *exec, const QDomText &value)
0855     : ValueBinding(exec, "QDomText", value)
0856 {
0857     StaticBinding::publish(exec, this, DomNode::methods());
0858     StaticBinding::publish(exec, this, DomText::methods());
0859 }
0860 
0861 NO_ENUMS(DomText)
0862 NO_STATICS(DomText)
0863 NO_METHODS(DomText)
0864 
0865 START_CTOR(DomText, QDomText, 0)
0866 return new KJSEmbed::DomTextBinding(exec, QDomText());
0867 END_CTOR
0868