Code

Filter effects dialog:
[inkscape.git] / src / dom / jsdombind.cpp
1  /**
2  * Phoebe DOM Implementation.
3  *
4  * This is a C++ approximation of the W3C DOM model, which follows
5  * fairly closely the specifications in the various .idl files, copies of
6  * which are provided for reference.  Most important is this one:
7  *
8  * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/idl-definitions.html
9  *
10  * Authors:
11  *   Bob Jamison
12  *
13  * Copyright (C) 2006-2007 Bob Jamison
14  *
15  *  This library is free software; you can redistribute it and/or
16  *  modify it under the terms of the GNU Lesser General Public
17  *  License as published by the Free Software Foundation; either
18  *  version 2.1 of the License, or (at your option) any later version.
19  *
20  *  This library is distributed in the hope that it will be useful,
21  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
22  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
23  *  Lesser General Public License for more details.
24  *
25  *  You should have received a copy of the GNU Lesser General Public
26  *  License along with this library; if not, write to the Free Software
27  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
28  */
29  
31 /**
32  * This code provides the ECMAScript (Javascript) binding to the classes
33  * of the DOM Level 3 Core.   This should provide DOM manipulation for
34  * most general-purpose XML and Document-like applications.   More specialized
35  * applications like SVG should inherit from the core C++ classes, and also
36  * use the prototypes in this file as the basis for their bindings.
37  *     
38  * To ensure that we at least attempt to bind ECMAScript to DOM
39  * as closely as possible to the standards, we will include the entire
40  * Appendix H of the XML Level 3 Core spec as annotations in this file.
41  * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/ecma-script-binding.html
42  */
43  
44  
45  
46  #include "domimpl.h"
47  #include "jsdombind.h"
48  
49  #include <stdarg.h>
50  
51  
52  namespace org
53  {
54  namespace w3c
55  {
56  namespace dom
57  {
60 //########################################################################
61 //# M E S S A G E S
62 //########################################################################
63 void JavascriptDOMBinder::error(char *fmt, ...)
64 {
65     va_list args;
66     va_start(args, fmt);
67     fprintf(stderr, "JS error: ");
68     vfprintf(stderr, fmt, args);
69     fprintf(stderr, "\n");
70     va_end(args);
71 }
74 void JavascriptDOMBinder::trace(char *fmt, ...)
75 {
76     va_list args;
77     va_start(args, fmt);
78     fprintf(stdout, "JS: ");
79     vfprintf(stdout, fmt, args);
80     fprintf(stdout, "\n");
81     va_end(args);
82 }
86 //########################################################################
87 //# U T I L I T Y
88 //########################################################################
90 //Use this for getting the JavascriptEngine from an object method
91 #define BINDER ((JavascriptDOMBinder *) JS_GetContextPrivate(cx))
93 #define NewObjectVal (CLASSNAME) \
94     OBJECT_TO_JSVAL( JS_NewObject(cx, \
95                     &wrapperClassDef, \
96                     (JavascriptDOMBinder *) JS_GetContextPrivate(cx)->proto_## CLASSNAME, \
97                     (void *) priv) );
99 #define NewObjectPtrVal (CLASSNAME) \
100     OBJECT_TO_JSVAL( JS_NewObject(cx, \
101                     &wrapperClassDef, \
102                     (JavascriptDOMBinder *) JS_GetContextPrivate(cx)->proto_## CLASSNAME, \
103                     (void *) new ## CLASSNAME ## Ptr (priv) ));
105 /**
106  * The name of the property is an enumeration, so just return the value.
107  */
108 static JSBool GetEnumProperty(JSContext *cx, JSObject *obj,
109                   jsval id, jsval *vp)
111     *vp = id;
112     return JS_TRUE;
116 static JSString *domToJString(JSContext *cx, const DOMString &s)
118     JSString *str = JS_NewStringCopyN(cx, s.c_str(), s.size());
119     return str;
122 static DOMString jvToDomString(JSContext *cx, jsval s)
124     JSString *jstr = JS_ValueToString(cx, s);
125     DOMString str = JS_GetStringBytes(jstr);
126     return str;
129 static DOMString jToDomString(JSString *s)
131     DOMString str = JS_GetStringBytes(s);
132     return str;
136 //########################################################################
137 //# C L A S S E S
138 //########################################################################
141 /**   
142  * Appendix H: ECMAScript Language Binding
143  * 
144  * This appendix contains the complete ECMAScript [ECMAScript] binding for the 
145  * Level 3 Document Object Model Core definitions. H.1 ECMAScript Binding 
146  * Extension
147  * 
148  */
149  
150 class Wrapper
152 public:
154     Wrapper(JSContext *context, JSObject *object)
155             { cx = context; obj = object; } 
156             
157         virtual ~Wrapper()
158             {}
159  
160     virtual JSBool init(uintN argc, jsval *argv)
161         {
162         return JS_TRUE;
163         }
164         
165     virtual JSBool getProperty(jsval id, jsval *vp)
166         {
167         return JS_FALSE;
168         }
170     virtual JSBool setProperty(jsval id, jsval *vp)
171         {
172         return JS_FALSE;
173         }
174         
175 protected:
177     JSContext *cx;
178     
179     JSObject *obj;
181 };
182  
183 /**
184  * WrapperProperty - Callback for retrieving properties
185  */
186 static JSBool wrapperGetProperty(JSContext *cx, JSObject *obj,
187                    jsval id, jsval *vp)
189     Wrapper *w = (Wrapper *) JS_GetPrivate(cx, obj);
190     return w->getProperty(id, vp);
193 /**
194  * JSSetProperty - Callback for setting properties
195  */
196 static JSBool wrapperSetProperty(JSContext *cx, JSObject *obj,
197                    jsval id, jsval *vp)
199     Wrapper *w = (Wrapper *) JS_GetPrivate(cx, obj);
200     return w->setProperty(id, vp);
203 /**
204  * JSConstructor - Callback for when a this object is created
205  */
206 static JSBool wrapperConstructor(JSContext *cx, JSObject *obj, uintN argc,
207                    jsval *argv, jsval *rval)
209     Wrapper *w = new Wrapper(cx, obj);
210     JSBool ret = w->init(argc, argv);
211     *rval = OBJECT_TO_JSVAL(obj);
212     return ret;
215 /**
216  * JSDestructor - Callback for when a this object is destroyed
217  */
218 static void wrapperDestructor(JSContext *cx, JSObject *obj)
220     Wrapper *w = (Wrapper *) JS_GetPrivate(cx, obj);
221     delete w;
224 static JSClass wrapperClassDef =
226         "DOMWrapper",
227                 JSCLASS_HAS_PRIVATE,
228         JS_PropertyStub,          JS_PropertyStub,
229         wrapperGetProperty,       wrapperSetProperty,
230         JS_EnumerateStub,         JS_ResolveStub, 
231         JS_ConvertStub,           wrapperDestructor
232 };
234         
235 /**
236  * JSInit - Create a prototype for this class
237  */
238 static JSObject* wrapperInit(JSContext *cx, JSObject *obj,
239                              JSNative       constructor,
240                              JSPropertySpec *properties,
241                              JSFunctionSpec *methods,
242                              JSPropertySpec *staticProperties,
243                              JSFunctionSpec *staticMethods,
244                                                          JSObject       *proto = NULL)
246         JSObject *protoObj = JS_InitClass(cx, obj, proto,
247                          &wrapperClassDef, 
248                  wrapperConstructor, 0,
249                  properties,
250                                  methods,
251                  staticProperties,
252                                  staticMethods);
253         return protoObj;
256 #define WRAP_NAME(NAME) NAME ## _wrapper
257 #define CLASS_NAME(NAME) WRAP_NAME(NAME)
259 #define CONST_NAME(NAME) NAME ## _constructor
260 #define CONSTRUCTOR_NAME(NAME) CONST_NAME(NAME)
262 #define PT_NAME(NAME) NAME ## _properties
263 #define PROPERTY_TABLE(NAME) PT_NAME(NAME)
265 #define M_NAME(NAME) NAME ## _method
266 #define METHOD_NAME(NAME) M_NAME(NAME)
267 #define MT_NAME(NAME) NAME ## _methods
268 #define METHOD_TABLE(NAME) MT_NAME(NAME)
270 #define SPT_NAME(NAME) NAME ## _staticProperties
271 #define STATIC_PROPERTY_TABLE(NAME) SPT_NAME(NAME)
273 #define SMT_NAME(NAME) NAME ## _staticMethods
274 #define STATIC_METHOD_TABLE(NAME) SMT_NAME(NAME)
276 #define METHOD(NAME) \
277 static JSBool NAME(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) \
278 { return ((CLASS_NAME(CURRENT_CLASS) *) JS_GetPrivate(cx, obj))->METHOD_NAME(NAME)(argc, argv, rval); } \
279     JSBool METHOD_NAME(NAME)(uintN argc, jsval *argv, jsval *rval)
281 #define CONSTRUCTOR(NAME) \
282 static JSBool CONSTRUCTOR_NAME(NAME)(JSContext *cx, \
283                    JSObject *obj, uintN argc, \
284                    jsval *argv, jsval *rval) \
285 { \
286     CLASS_NAME(NAME) *w = new CLASS_NAME(NAME)(cx, obj); \
287     JSBool ret = w->init(argc, argv); \
288     *rval = OBJECT_TO_JSVAL(obj); \
289     return ret; \
292 #define CREATE_PROTO(NAME, cx, obj, proto) \
293       JS_InitClass(cx, obj, proto, &wrapperClassDef, \
294           CONSTRUCTOR_NAME(NAME), 0, \
295           PROPERTY_TABLE(NAME), \
296               METHOD_TABLE(NAME), \
297           STATIC_PROPERTY_TABLE(NAME), \
298               STATIC_METHOD_TABLE(NAME));
300 //########################################################################
301 //# DOMImplementationRegistry
302 //########################################################################
303   
304 /** 
305  * This section defines the DOMImplementationRegistry object, discussed in 
306  * Bootstrapping, for ECMAScript.
307  * 
308  * 
309  * Objects that implements the DOMImplementationRegistry interface
310  * 
311  *     DOMImplementationRegistry is a global variable which has the following
312  *      functions:
313  * 
314  *         getDOMImplementation(features)
315  *             This method returns the first registered object that implements
316  *             the DOMImplementation interface and has the desired features,
317  *             or null if none is found. The features parameter is a String.
318  *             See also DOMImplementationSource.getDOMImplementation().
319  * 
320  *         getDOMImplementationList(features)
321  *             This method returns a DOMImplementationList list of registered
322  *             object that implements the DOMImplementation interface and
323  *             has the desired features. The features parameter is a String.
324  *             See also DOMImplementationSource.getDOMImplementationList().
325  * 
326  * 
327  */
328 #define CURRENT_CLASS  DOMImplementationRegistry
330 class CLASS_NAME(CURRENT_CLASS) : public Wrapper
332 public:
334      CLASS_NAME(CURRENT_CLASS)(JSContext*cx, JSObject *obj)
335                     : Wrapper(cx, obj)
336         {}
337         
338     ~CLASS_NAME(CURRENT_CLASS)()
339         {}
341     JSBool init(uintN argc, jsval *argv)
342         {
343         return JS_TRUE;
344         }
345         
346     JSBool getProperty(jsval id, jsval *vp)
347         {
348         return JS_FALSE;
349         }
351     JSBool setProperty(jsval id, jsval *vp)
352         {
353         return JS_FALSE;
354         }
356         /**
357          *
358          */
359     METHOD(getDOMImplementation)
360         {
361         return JS_FALSE;
362         }
363         
365         /**
366          *
367          */
368     METHOD(getDOMImplementationList)
369         {
370         return JS_FALSE;
371         }
373     enum
374         {
375         prop_code
376         };
378 };
383 JSPropertySpec PROPERTY_TABLE(CURRENT_CLASS)[] = 
384
385     { 0 }
386 };
388 JSFunctionSpec METHOD_TABLE(CURRENT_CLASS)[] = 
390     { "getDOMImplementation",
391              CLASS_NAME(CURRENT_CLASS)::getDOMImplementation, 1, 0, 0 },
392     { "getDOMImplementationList", 
393              CLASS_NAME(CURRENT_CLASS)::getDOMImplementationList, 1, 0, 0 },
394     { 0 }
395 };
397 JSPropertySpec STATIC_PROPERTY_TABLE(CURRENT_CLASS)[] = 
398
399     { 0 }
400 };
402 JSFunctionSpec STATIC_METHOD_TABLE(CURRENT_CLASS)[] = 
404     { 0 }
405 };
408 CONSTRUCTOR ( CURRENT_CLASS )
412 /**
413  * H.2 Other Core interfaces
414  */
419 //########################################################################
420 //# DOMException
421 //########################################################################
422   
423 /**
424  * Properties of the DOMException Constructor function:
425  * 
426  *     DOMException.INDEX_SIZE_ERR
427  *         The value of the constant DOMException.INDEX_SIZE_ERR is 1.
428  *     DOMException.DOMSTRING_SIZE_ERR
429  *         The value of the constant DOMException.DOMSTRING_SIZE_ERR is 2.
430  *     DOMException.HIERARCHY_REQUEST_ERR
431  *         The value of the constant DOMException.HIERARCHY_REQUEST_ERR is 3.
432  *     DOMException.WRONG_DOCUMENT_ERR
433  *         The value of the constant DOMException.WRONG_DOCUMENT_ERR is 4.
434  *     DOMException.INVALID_CHARACTER_ERR
435  *         The value of the constant DOMException.INVALID_CHARACTER_ERR is 5.
436  *     DOMException.NO_DATA_ALLOWED_ERR
437  *         The value of the constant DOMException.NO_DATA_ALLOWED_ERR is 6.
438  *     DOMException.NO_MODIFICATION_ALLOWED_ERR
439  *         The value of the constant DOMException.NO_MODIFICATION_ALLOWED_ERR is 7.
440  *     DOMException.NOT_FOUND_ERR
441  *         The value of the constant DOMException.NOT_FOUND_ERR is 8.
442  *     DOMException.NOT_SUPPORTED_ERR
443  *         The value of the constant DOMException.NOT_SUPPORTED_ERR is 9.
444  *     DOMException.INUSE_ATTRIBUTE_ERR
445  *         The value of the constant DOMException.INUSE_ATTRIBUTE_ERR is 10.
446  *     DOMException.INVALID_STATE_ERR
447  *         The value of the constant DOMException.INVALID_STATE_ERR is 11.
448  *     DOMException.SYNTAX_ERR
449  *         The value of the constant DOMException.SYNTAX_ERR is 12.
450  *     DOMException.INVALID_MODIFICATION_ERR
451  *         The value of the constant DOMException.INVALID_MODIFICATION_ERR is 13.
452  *     DOMException.NAMESPACE_ERR
453  *         The value of the constant DOMException.NAMESPACE_ERR is 14.
454  *     DOMException.INVALID_ACCESS_ERR
455  *         The value of the constant DOMException.INVALID_ACCESS_ERR is 15.
456  *     DOMException.VALIDATION_ERR
457  *         The value of the constant DOMException.VALIDATION_ERR is 16.
458  *     DOMException.TYPE_MISMATCH_ERR
459  *         The value of the constant DOMException.TYPE_MISMATCH_ERR is 17. 
460  * 
461  * Objects that implement the DOMException interface:
462  * 
463  *     Properties of objects that implement the DOMException interface:
464  * 
465  *         code
466  *             This property is a Number.
467  * 
468  */
470 #undef CURRENT_CLASS
471 #define CURRENT_CLASS DOMException
473 class CLASS_NAME(CURRENT_CLASS) : public Wrapper
475 public:
477      CLASS_NAME(CURRENT_CLASS)(JSContext*cx, JSObject *obj)
478                     : Wrapper(cx, obj)
479         {}
480         
481     ~CLASS_NAME(CURRENT_CLASS)()
482         {}
484     JSBool init(uintN argc, jsval *argv)
485         {
486         return JS_TRUE;
487         }
488         
489     JSBool getProperty(jsval id, jsval *vp)
490         {
491         return JS_FALSE;
492         }
494     JSBool setProperty(jsval id, jsval *vp)
495         {
496         return JS_FALSE;
497         }
498         
499     enum
500         {
501         prop_code
502         };
504 };
507 JSPropertySpec PROPERTY_TABLE(CURRENT_CLASS)[] = 
508
509     { "code",  CLASS_NAME(CURRENT_CLASS)::prop_code, JSPROP_ENUMERATE },
510     { 0 }
511 };
513 JSFunctionSpec METHOD_TABLE(CURRENT_CLASS)[] = 
515     { 0 }
516 };
518 JSPropertySpec STATIC_PROPERTY_TABLE(CURRENT_CLASS)[] = 
519
520     { "INDEX_SIZE_ERR",               DOMException::INDEX_SIZE_ERR,
521             JSPROP_READONLY, GetEnumProperty  },
522     { "DOMSTRING_SIZE_ERR",           DOMException::DOMSTRING_SIZE_ERR,
523             JSPROP_READONLY, GetEnumProperty  },
524     { "HIERARCHY_REQUEST_ERR",        DOMException::HIERARCHY_REQUEST_ERR,
525             JSPROP_READONLY, GetEnumProperty  },
526     { "WRONG_DOCUMENT_ERR",           DOMException::WRONG_DOCUMENT_ERR,
527             JSPROP_READONLY, GetEnumProperty  },
528     { "INVALID_CHARACTER_ERR",        DOMException::INVALID_CHARACTER_ERR,
529             JSPROP_READONLY, GetEnumProperty  },
530     { "NO_DATA_ALLOWED_ERR",          DOMException::NO_DATA_ALLOWED_ERR,
531             JSPROP_READONLY, GetEnumProperty  },
532     { "NO_MODIFICATION_ALLOWED_ERR",  DOMException::NO_MODIFICATION_ALLOWED_ERR,
533             JSPROP_READONLY, GetEnumProperty  },
534     { "NOT_FOUND_ERR",                DOMException::NOT_FOUND_ERR,
535             JSPROP_READONLY, GetEnumProperty  },
536     { "NOT_SUPPORTED_ERR",            DOMException::NOT_SUPPORTED_ERR,
537             JSPROP_READONLY, GetEnumProperty  },
538     { "INUSE_ATTRIBUTE_ERR",          DOMException::INUSE_ATTRIBUTE_ERR,
539             JSPROP_READONLY, GetEnumProperty  },
540     { "INVALID_STATE_ERR",            DOMException::INVALID_STATE_ERR,
541             JSPROP_READONLY, GetEnumProperty  },
542     { "SYNTAX_ERR",                   DOMException::SYNTAX_ERR,
543             JSPROP_READONLY, GetEnumProperty  },
544     { "INVALID_MODIFICATION_ERR",     DOMException::INVALID_MODIFICATION_ERR,
545             JSPROP_READONLY, GetEnumProperty  },
546     { "NAMESPACE_ERR",                DOMException::NAMESPACE_ERR,
547             JSPROP_READONLY, GetEnumProperty  },
548     { "INVALID_ACCESS_ERR",           DOMException::INVALID_ACCESS_ERR,
549             JSPROP_READONLY, GetEnumProperty  },
550     { "VALIDATION_ERR",               DOMException::VALIDATION_ERR,
551             JSPROP_READONLY, GetEnumProperty  },
552     { "TYPE_MISMATCH_ERR",            DOMException::TYPE_MISMATCH_ERR,
553             JSPROP_READONLY, GetEnumProperty  },
554     { 0 }
555 };
557 JSFunctionSpec STATIC_METHOD_TABLE(CURRENT_CLASS)[] = 
559      { 0 }
560 };
564 CONSTRUCTOR ( CURRENT_CLASS )
569 //########################################################################
570 //# DOMStringList
571 //########################################################################
573 /**
574  * Objects that implement the DOMStringList interface:
575  * 
576  *     Properties of objects that implement the DOMStringList interface:
577  * 
578  *         length
579  *             This read-only property is a Number. 
580  * 
581  *     Functions of objects that implement the DOMStringList interface:
582  * 
583  *         item(index)
584  *             This function returns a String.
585  *             The index parameter is a Number.
586  *             Note: This object can also be dereferenced using square bracket
587  *              notation (e.g. obj[1]). Dereferencing with an integer index
588  *              is equivalent to invoking the item function with that index.
589  * 
590  *         contains(str)
591  *             This function returns a Boolean.
592  *             The str parameter is a String. 
593  * 
594  */
596 #undef CURRENT_CLASS
597 #define CURRENT_CLASS  DOMStringList
599 class CLASS_NAME(CURRENT_CLASS) : public Wrapper
601 public:
603      CLASS_NAME(CURRENT_CLASS)(JSContext*cx, JSObject *obj)
604                     : Wrapper(cx, obj)
605         {}
606         
607     ~CLASS_NAME(CURRENT_CLASS)()
608         {}
610     JSBool init(uintN argc, jsval *argv)
611         {
612         return JS_TRUE;
613         }
614         
615     JSBool getProperty(jsval id, jsval *vp)
616         {
617         return JS_FALSE;
618         }
620     JSBool setProperty(jsval id, jsval *vp)
621         {
622         return JS_FALSE;
623         }
625         /**
626          *
627          */
628     METHOD(getDOMImplementation)
629         {
630         return JS_FALSE;
631         }
632         
634         /**
635          *
636          */
637     METHOD(getDOMImplementationList)
638         {
639         return JS_FALSE;
640         }
642     enum
643         {
644         prop_code
645         };
647 };
652 JSPropertySpec PROPERTY_TABLE(CURRENT_CLASS)[] = 
653
654     { 0 }
655 };
657 JSFunctionSpec METHOD_TABLE(CURRENT_CLASS)[] = 
659     { 0 }
660 };
662 JSPropertySpec STATIC_PROPERTY_TABLE(CURRENT_CLASS)[] = 
663
664     { 0 }
665 };
667 JSFunctionSpec STATIC_METHOD_TABLE(CURRENT_CLASS)[] = 
669     { 0 }
670 };
673 CONSTRUCTOR ( CURRENT_CLASS )
678 //########################################################################
679 //# NameList
680 //########################################################################
682 /**
683  * Objects that implement the NameList interface:
684  * 
685  *     Properties of objects that implement the NameList interface:
686  * 
687  *         length
688  *             This read-only property is a Number. 
689  * 
690  *     Functions of objects that implement the NameList interface:
691  * 
692  *         getName(index)
693  *             This function returns a String.
694  *             The index parameter is a Number. 
695  *         getNamespaceURI(index)
696  *             This function returns a String.
697  *             The index parameter is a Number. 
698  *         contains(str)
699  *             This function returns a Boolean.
700  *             The str parameter is a String. 
701  *         containsNS(namespaceURI, name)
702  *             This function returns a Boolean.
703  *             The namespaceURI parameter is a String.
704  *             The name parameter is a String. 
705  */
707 #undef CURRENT_CLASS
708 #define CURRENT_CLASS  NameList
710 class CLASS_NAME(CURRENT_CLASS) : public Wrapper
712 public:
714      CLASS_NAME(CURRENT_CLASS)(JSContext*cx, JSObject *obj)
715                     : Wrapper(cx, obj)
716         {}
717         
718     ~CLASS_NAME(CURRENT_CLASS)()
719         {}
721     JSBool init(uintN argc, jsval *argv)
722         {
723         return JS_TRUE;
724         }
725         
726     JSBool getProperty(jsval id, jsval *vp)
727         {
728         return JS_FALSE;
729         }
731     JSBool setProperty(jsval id, jsval *vp)
732         {
733         return JS_FALSE;
734         }
736         /**
737          *
738          */
739     METHOD(getDOMImplementation)
740         {
741         return JS_FALSE;
742         }
743         
745         /**
746          *
747          */
748     METHOD(getDOMImplementationList)
749         {
750         return JS_FALSE;
751         }
753     enum
754         {
755         prop_code
756         };
758 };
763 JSPropertySpec PROPERTY_TABLE(CURRENT_CLASS)[] = 
764
765     { 0 }
766 };
768 JSFunctionSpec METHOD_TABLE(CURRENT_CLASS)[] = 
770     { 0 }
771 };
773 JSPropertySpec STATIC_PROPERTY_TABLE(CURRENT_CLASS)[] = 
774
775     { 0 }
776 };
778 JSFunctionSpec STATIC_METHOD_TABLE(CURRENT_CLASS)[] = 
780     { 0 }
781 };
784 CONSTRUCTOR ( CURRENT_CLASS )
791 //########################################################################
792 //# DOMImplementationList
793 //########################################################################
795 /**
796  * Objects that implement the DOMImplementationList interface:
797  * 
798  *     Properties of objects that implement the DOMImplementationList interface:
799  * 
800  *         length
801  *             This read-only property is a Number. 
802  * 
803  *     Functions of objects that implement the DOMImplementationList interface:
804  * 
805  *         item(index)
806  *             This function returns an object that implements the
807  *               DOMImplementation interface.
808  *             The index parameter is a Number.
809  *             Note: This object can also be dereferenced using square bracket
810  *               notation (e.g. obj[1]). Dereferencing with an integer index
811  *               is equivalent to invoking the item function with that index.
812  * 
813  * 
814  */
816 #undef CURRENT_CLASS
817 #define CURRENT_CLASS  DOMImplementationList
819 class CLASS_NAME(CURRENT_CLASS) : public Wrapper
821 public:
823      CLASS_NAME(CURRENT_CLASS)(JSContext*cx, JSObject *obj)
824                     : Wrapper(cx, obj)
825         {}
826         
827     ~CLASS_NAME(CURRENT_CLASS)()
828         {}
830     JSBool init(uintN argc, jsval *argv)
831         {
832         return JS_TRUE;
833         }
834         
835     JSBool getProperty(jsval id, jsval *vp)
836         {
837         return JS_FALSE;
838         }
840     JSBool setProperty(jsval id, jsval *vp)
841         {
842         return JS_FALSE;
843         }
845         /**
846          *
847          */
848     METHOD(getDOMImplementation)
849         {
850         return JS_FALSE;
851         }
852         
854         /**
855          *
856          */
857     METHOD(getDOMImplementationList)
858         {
859         return JS_FALSE;
860         }
862     enum
863         {
864         prop_code
865         };
867 };
872 JSPropertySpec PROPERTY_TABLE(CURRENT_CLASS)[] = 
873
874     { 0 }
875 };
877 JSFunctionSpec METHOD_TABLE(CURRENT_CLASS)[] = 
879     { 0 }
880 };
882 JSPropertySpec STATIC_PROPERTY_TABLE(CURRENT_CLASS)[] = 
883
884     { 0 }
885 };
887 JSFunctionSpec STATIC_METHOD_TABLE(CURRENT_CLASS)[] = 
889     { 0 }
890 };
893 CONSTRUCTOR ( CURRENT_CLASS )
900 //########################################################################
901 //# DOMImplementationSource
902 //########################################################################
904 /**
905  * Objects that implement the DOMImplementationSource interface:
906  * 
907  *     Functions of objects that implement the DOMImplementationSource interface:
908  * 
909  *         getDOMImplementation(features)
910  *             This function returns an object that implements the
911  *               DOMImplementation interface.
912  *             The features parameter is a String. 
913  *         getDOMImplementationList(features)
914  *             This function returns an object that implements the
915  *               DOMImplementationList interface.
916  *             The features parameter is a String. 
917  */
919 #undef CURRENT_CLASS
920 #define CURRENT_CLASS  DOMImplementationSource
922 class CLASS_NAME(CURRENT_CLASS) : public Wrapper
924 public:
926      CLASS_NAME(CURRENT_CLASS)(JSContext*cx, JSObject *obj)
927                     : Wrapper(cx, obj)
928         {}
929         
930     ~CLASS_NAME(CURRENT_CLASS)()
931         {}
933     JSBool init(uintN argc, jsval *argv)
934         {
935         return JS_TRUE;
936         }
937         
938     JSBool getProperty(jsval id, jsval *vp)
939         {
940         return JS_FALSE;
941         }
943     JSBool setProperty(jsval id, jsval *vp)
944         {
945         return JS_FALSE;
946         }
948         /**
949          *
950          */
951     METHOD(getDOMImplementation)
952         {
953         return JS_FALSE;
954         }
955         
957         /**
958          *
959          */
960     METHOD(getDOMImplementationList)
961         {
962         return JS_FALSE;
963         }
965     enum
966         {
967         prop_code
968         };
970 };
975 JSPropertySpec PROPERTY_TABLE(CURRENT_CLASS)[] = 
976
977     { 0 }
978 };
980 JSFunctionSpec METHOD_TABLE(CURRENT_CLASS)[] = 
982     { 0 }
983 };
985 JSPropertySpec STATIC_PROPERTY_TABLE(CURRENT_CLASS)[] = 
986
987     { 0 }
988 };
990 JSFunctionSpec STATIC_METHOD_TABLE(CURRENT_CLASS)[] = 
992     { 0 }
993 };
996 CONSTRUCTOR ( CURRENT_CLASS )
1004 //########################################################################
1005 //# DOMImplementation
1006 //########################################################################
1008 /**
1009  * Objects that implement the DOMImplementation interface:
1010  * 
1011  *     Functions of objects that implement the DOMImplementation interface:
1012  * 
1013  *         hasFeature(feature, version)
1014  *             This function returns a Boolean.
1015  *             The feature parameter is a String.
1016  *             The version parameter is a String. 
1017  *         createDocumentType(qualifiedName, publicId, systemId)
1018  *             This function returns an object that implements the
1019  *               DocumentType interface.
1020  *             The qualifiedName parameter is a String.
1021  *             The publicId parameter is a String.
1022  *             The systemId parameter is a String.
1023  *             This function can raise an object that implements the
1024  *               DOMException interface.
1025  *         createDocument(namespaceURI, qualifiedName, doctype)
1026  *             This function returns an object that implements the
1027  *               Document interface.
1028  *             The namespaceURI parameter is a String.
1029  *             The qualifiedName parameter is a String.
1030  *             The doctype parameter is an object that implements the
1031  *               DocumentType interface.
1032  *             This function can raise an object that implements the
1033  *               DOMException interface.
1034  *         getFeature(feature, version)
1035  *             This function returns an object that implements
1036  *               the Object interface.
1037  *             The feature parameter is a String.
1038  *             The version parameter is a String. 
1039  */
1041 #undef CURRENT_CLASS
1042 #define CURRENT_CLASS  DOMImplementation
1044 class CLASS_NAME(CURRENT_CLASS) : public Wrapper
1046 public:
1048      CLASS_NAME(CURRENT_CLASS)(JSContext*cx, JSObject *obj)
1049                     : Wrapper(cx, obj)
1050         {}
1051         
1052     ~CLASS_NAME(CURRENT_CLASS)()
1053         {}
1055     JSBool init(uintN argc, jsval *argv)
1056         {
1057         return JS_TRUE;
1058         }
1059         
1060     JSBool getProperty(jsval id, jsval *vp)
1061         {
1062         return JS_FALSE;
1063         }
1065     JSBool setProperty(jsval id, jsval *vp)
1066         {
1067         return JS_FALSE;
1068         }
1070         /**
1071          *
1072          */
1073     METHOD(getDOMImplementation)
1074         {
1075         return JS_FALSE;
1076         }
1077         
1079         /**
1080          *
1081          */
1082     METHOD(getDOMImplementationList)
1083         {
1084         return JS_FALSE;
1085         }
1087     enum
1088         {
1089         prop_code
1090         };
1092 };
1097 JSPropertySpec PROPERTY_TABLE(CURRENT_CLASS)[] = 
1098
1099     { 0 }
1100 };
1102 JSFunctionSpec METHOD_TABLE(CURRENT_CLASS)[] = 
1104     { 0 }
1105 };
1107 JSPropertySpec STATIC_PROPERTY_TABLE(CURRENT_CLASS)[] = 
1108
1109     { 0 }
1110 };
1112 JSFunctionSpec STATIC_METHOD_TABLE(CURRENT_CLASS)[] = 
1114     { 0 }
1115 };
1118 CONSTRUCTOR ( CURRENT_CLASS )
1127 //########################################################################
1128 //# DocumentFragment
1129 //########################################################################
1131 /**
1132  * Objects that implement the DocumentFragment interface:
1133  *
1134  * Objects that implement the DocumentFragment interface have all
1135  * properties and functions of the Node interface.
1136  */
1138 #undef CURRENT_CLASS
1139 #define CURRENT_CLASS  DocumentFragment
1141 class CLASS_NAME(CURRENT_CLASS) : public Wrapper
1143 public:
1145      CLASS_NAME(CURRENT_CLASS)(JSContext*cx, JSObject *obj)
1146                     : Wrapper(cx, obj)
1147         {}
1148         
1149     ~CLASS_NAME(CURRENT_CLASS)()
1150         {}
1152     JSBool init(uintN argc, jsval *argv)
1153         {
1154         return JS_TRUE;
1155         }
1156         
1157     JSBool getProperty(jsval id, jsval *vp)
1158         {
1159         return JS_FALSE;
1160         }
1162     JSBool setProperty(jsval id, jsval *vp)
1163         {
1164         return JS_FALSE;
1165         }
1167         /**
1168          *
1169          */
1170     METHOD(getDOMImplementation)
1171         {
1172         return JS_FALSE;
1173         }
1174         
1176         /**
1177          *
1178          */
1179     METHOD(getDOMImplementationList)
1180         {
1181         return JS_FALSE;
1182         }
1184     enum
1185         {
1186         prop_code
1187         };
1189 };
1194 JSPropertySpec PROPERTY_TABLE(CURRENT_CLASS)[] = 
1195
1196     { 0 }
1197 };
1199 JSFunctionSpec METHOD_TABLE(CURRENT_CLASS)[] = 
1201     { 0 }
1202 };
1204 JSPropertySpec STATIC_PROPERTY_TABLE(CURRENT_CLASS)[] = 
1205
1206     { 0 }
1207 };
1209 JSFunctionSpec STATIC_METHOD_TABLE(CURRENT_CLASS)[] = 
1211     { 0 }
1212 };
1215 CONSTRUCTOR ( CURRENT_CLASS )
1222 //########################################################################
1223 //# Document
1224 //########################################################################
1226 /**
1227  * Objects that implement the Document interface:
1228  * 
1229  *         Objects that implement the Document interface have all properties
1230  *         and functions of the Node interface as well as the properties
1231  *           and functions defined below. 
1232  *         Properties of objects that implement the Document interface:
1233  * 
1234  * 
1235  *         doctype
1236  *             This read-only property is an object that implements
1237  *               the DocumentType interface.
1238  *         implementation
1239  *             This read-only property is an object that implements
1240  *               the DOMImplementation interface.
1241  *         documentElement
1242  *             This read-only property is an object that implements
1243  *               the Element interface.
1244  *         inputEncoding
1245  *             This read-only property is a String.
1246  *         xmlEncoding
1247  *             This read-only property is a String.
1248  *         xmlStandalone
1249  *             This property is a Boolean and can raise an object
1250  *               that implements the DOMException interface on setting.
1251  *         xmlVersion
1252  *             This property is a String and can raise an object
1253  *               that implements the DOMException interface on setting.
1254  *         strictErrorChecking
1255  *             This property is a Boolean.
1256  *         documentURI
1257  *             This property is a String.
1258  *         domConfig
1259  *             This read-only property is an object that implements
1260  *               the DOMConfiguration interface.
1261  * 
1262  * 
1263  *     Functions of objects that implement the Document interface:
1264  * 
1265  *         createElement(tagName)
1266  *             This function returns an object that implements
1267  *               the Element interface.
1268  *             The tagName parameter is a String.
1269  *             This function can raise an object that implements
1270  *               the DOMException interface.
1271  *         createDocumentFragment()
1272  *             This function returns an object that implements
1273  *               the DocumentFragment interface.
1274  *         createTextNode(data)
1275  *             This function returns an object that implements
1276  *               the Text interface.
1277  *             The data parameter is a String. 
1278  *         createComment(data)
1279  *             This function returns an object that implements
1280  *               the Comment interface.
1281  *             The data parameter is a String. 
1282  *         createCDATASection(data)
1283  *             This function returns an object that implements
1284  *               the CDATASection interface.
1285  *             The data parameter is a String.
1286  *             This function can raise an object that implements
1287  *               the DOMException interface.
1288  *         createProcessingInstruction(target, data)
1289  *             This function returns an object that implements
1290  *               the ProcessingInstruction interface.
1291  *             The target parameter is a String.
1292  *             The data parameter is a String.
1293  *             This function can raise an object that implements
1294  *               the DOMException interface.
1295  *         createAttribute(name)
1296  *             This function returns an object that implements
1297  *               the Attr interface.
1298  *             The name parameter is a String.
1299  *             This function can raise an object that implements
1300  *               the DOMException interface.
1301  *         createEntityReference(name)
1302  *             This function returns an object that implements
1303  *               the EntityReference interface.
1304  *             The name parameter is a String.
1305  *             This function can raise an object that implements
1306  *               the DOMException interface.
1307  *         getElementsByTagName(tagname)
1308  *             This function returns an object that implements
1309  *               the NodeList interface.
1310  *             The tagname parameter is a String. 
1311  *         importNode(importedNode, deep)
1312  *             This function returns an object that implements
1313  *               the Node interface.
1314  *             The importedNode parameter is an object that implements
1315  *               the Node interface.
1316  *             The deep parameter is a Boolean.
1317  *             This function can raise an object that implements
1318  *               the DOMException interface.
1319  *         createElementNS(namespaceURI, qualifiedName)
1320  *             This function returns an object that implements
1321  *               the Element interface.
1322  *             The namespaceURI parameter is a String.
1323  *             The qualifiedName parameter is a String.
1324  *             This function can raise an object that implements
1325  *               the DOMException interface.
1326  *         createAttributeNS(namespaceURI, qualifiedName)
1327  *             This function returns an object that implements
1328  *               the Attr interface.
1329  *             The namespaceURI parameter is a String.
1330  *             The qualifiedName parameter is a String.
1331  *             This function can raise an object that implements
1332  *               the DOMException interface.
1333  *         getElementsByTagNameNS(namespaceURI, localName)
1334  *             This function returns an object that implements
1335  *               the NodeList interface.
1336  *             The namespaceURI parameter is a String.
1337  *             The localName parameter is a String. 
1338  *         getElementById(elementId)
1339  *             This function returns an object that implements
1340  *               the Element interface.
1341  *             The elementId parameter is a String. 
1342  *         adoptNode(source)
1343  *             This function returns an object that implements
1344  *               the Node interface.
1345  *             The source parameter is an object that implements
1346  *               the Node interface.
1347  *             This function can raise an object that implements
1348  *               the DOMException interface.
1349  *         normalizeDocument()
1350  *             This function has no return value. 
1351  *         renameNode(n, namespaceURI, qualifiedName)
1352  *             This function returns an object that implements
1353  *               the Node interface.
1354  *             The n parameter is an object that implements
1355  *               the Node interface.
1356  *             The namespaceURI parameter is a String.
1357  *             The qualifiedName parameter is a String.
1358  *             This function can raise an object that implements
1359  *               the DOMException interface. 
1360  */
1362 #undef CURRENT_CLASS
1363 #define CURRENT_CLASS  Document
1365 class CLASS_NAME(CURRENT_CLASS) : public Wrapper
1367 public:
1369      CLASS_NAME(CURRENT_CLASS)(JSContext*cx, JSObject *obj)
1370                     : Wrapper(cx, obj)
1371         {}
1372         
1373     ~CLASS_NAME(CURRENT_CLASS)()
1374         {}
1376     JSBool init(uintN argc, jsval *argv)
1377         {
1378         return JS_TRUE;
1379         }
1380         
1381     JSBool getProperty(jsval id, jsval *vp)
1382         {
1383         return JS_FALSE;
1384         }
1386     JSBool setProperty(jsval id, jsval *vp)
1387         {
1388         return JS_FALSE;
1389         }
1391         /**
1392          *
1393          */
1394     METHOD(getDOMImplementation)
1395         {
1396         return JS_FALSE;
1397         }
1398         
1400         /**
1401          *
1402          */
1403     METHOD(getDOMImplementationList)
1404         {
1405         return JS_FALSE;
1406         }
1408     enum
1409         {
1410         prop_code
1411         };
1412         
1413     DocumentPtr doc;
1415 };
1420 JSPropertySpec PROPERTY_TABLE(CURRENT_CLASS)[] = 
1421
1422     { 0 }
1423 };
1425 JSFunctionSpec METHOD_TABLE(CURRENT_CLASS)[] = 
1427     { 0 }
1428 };
1430 JSPropertySpec STATIC_PROPERTY_TABLE(CURRENT_CLASS)[] = 
1431
1432     { 0 }
1433 };
1435 JSFunctionSpec STATIC_METHOD_TABLE(CURRENT_CLASS)[] = 
1437     { 0 }
1438 };
1441 CONSTRUCTOR ( CURRENT_CLASS )
1447 //########################################################################
1448 //# Node
1449 //########################################################################
1451 /**
1452  * Properties of the Node Constructor function:
1453  * 
1454  *     Node.ELEMENT_NODE
1455  *         The value of the constant Node.ELEMENT_NODE is 1.
1456  *     Node.ATTRIBUTE_NODE
1457  *         The value of the constant Node.ATTRIBUTE_NODE is 2.
1458  *     Node.TEXT_NODE
1459  *         The value of the constant Node.TEXT_NODE is 3.
1460  *     Node.CDATA_SECTION_NODE
1461  *         The value of the constant Node.CDATA_SECTION_NODE is 4.
1462  *     Node.ENTITY_REFERENCE_NODE
1463  *         The value of the constant Node.ENTITY_REFERENCE_NODE is 5.
1464  *     Node.ENTITY_NODE
1465  *         The value of the constant Node.ENTITY_NODE is 6.
1466  *     Node.PROCESSING_INSTRUCTION_NODE
1467  *         The value of the constant Node.PROCESSING_INSTRUCTION_NODE is 7.
1468  *     Node.COMMENT_NODE
1469  *         The value of the constant Node.COMMENT_NODE is 8.
1470  *     Node.DOCUMENT_NODE
1471  *         The value of the constant Node.DOCUMENT_NODE is 9.
1472  *     Node.DOCUMENT_TYPE_NODE
1473  *         The value of the constant Node.DOCUMENT_TYPE_NODE is 10.
1474  *     Node.DOCUMENT_FRAGMENT_NODE
1475  *         The value of the constant Node.DOCUMENT_FRAGMENT_NODE is 11.
1476  *     Node.NOTATION_NODE
1477  *         The value of the constant Node.NOTATION_NODE is 12.
1478  *     Node.DOCUMENT_POSITION_DISCONNECTED
1479  *         The value of the constant Node.DOCUMENT_POSITION_DISCONNECTED
1480  *           is 0x01.
1481  *     Node.DOCUMENT_POSITION_PRECEDING
1482  *         The value of the constant Node.DOCUMENT_POSITION_PRECEDING
1483  *           is 0x02.
1484  *     Node.DOCUMENT_POSITION_FOLLOWING
1485  *         The value of the constant Node.DOCUMENT_POSITION_FOLLOWING
1486  *           is 0x04.
1487  *     Node.DOCUMENT_POSITION_CONTAINS
1488  *         The value of the constant Node.DOCUMENT_POSITION_CONTAINS
1489  *           is 0x08.
1490  *     Node.DOCUMENT_POSITION_CONTAINED_BY
1491  *         The value of the constant Node.DOCUMENT_POSITION_CONTAINED_BY
1492  *           is 0x10.
1493  *     Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC
1494  *         The value of the constant Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC 
1495  *          is 0x20. 
1496  * 
1497  * Objects that implement the Node interface:
1498  * 
1499  *     Properties of objects that implement the Node interface:
1500  * 
1501  *         nodeName
1502  *             This read-only property is a String.
1503  *         nodeValue
1504  *             This property is a String, can raise an object that implements
1505  *               the DOMException 
1506  *             interface on setting and can raise an object that implements
1507  *               the DOMException 
1508  *             interface on retrieval.
1509  *         nodeType
1510  *             This read-only property is a Number.
1511  *         parentNode
1512  *             This read-only property is an object that implements
1513  *               the Node interface.
1514  *         childNodes
1515  *             This read-only property is an object that implements
1516  *               the NodeList interface.
1517  *         firstChild
1518  *             This read-only property is an object that implements
1519  *               the Node interface.
1520  *         lastChild
1521  *             This read-only property is an object that implements
1522  *               the Node interface.
1523  *         previousSibling
1524  *             This read-only property is an object that implements
1525  *               the Node interface.
1526  *         nextSibling
1527  *             This read-only property is an object that implements
1528  *               the Node interface.
1529  *         attributes
1530  *             This read-only property is an object that implements
1531  *               the NamedNodeMap interface.
1532  *         ownerDocument
1533  *             This read-only property is an object that implements
1534  *               the Document interface.
1535  *         namespaceURI
1536  *             This read-only property is a String.
1537  *         prefix
1538  *             This property is a String and can raise an object
1539  *               that implements the DOMException interface on setting.
1540  *         localName
1541  *             This read-only property is a String.
1542  *         baseURI
1543  *             This read-only property is a String.
1544  *         textContent
1545  *             This property is a String, can raise an object that implements
1546  *               the DOMException interface on setting and can raise
1547  *               an object that implements the DOMException interface
1548  *               on retrieval.
1549  * 
1550  * 
1551  *     Functions of objects that implement the Node interface:
1552  * 
1553  *         insertBefore(newChild, refChild)
1554  *             This function returns an object that implements
1555  *               the Node interface.
1556  *             The newChild parameter is an object that implements
1557  *               the Node interface.
1558  *             The refChild parameter is an object that implements
1559  *               the Node interface.
1560  *             This function can raise an object that implements
1561  *               the DOMException interface.
1562  *         replaceChild(newChild, oldChild)
1563  *             This function returns an object that implements
1564  *               the Node interface.
1565  *             The newChild parameter is an object that implements
1566  *               the Node interface.
1567  *             The oldChild parameter is an object that implements
1568  *               the Node interface.
1569  *             This function can raise an object that implements
1570  *               the DOMException interface.
1571  *         removeChild(oldChild)
1572  *             This function returns an object that implements
1573  *               the Node interface.
1574  *             The oldChild parameter is an object that implements
1575  *               the Node interface.
1576  *             This function can raise an object that implements
1577  *               the DOMException interface.
1578  *         appendChild(newChild)
1579  *             This function returns an object that implements
1580  *               the Node interface.
1581  *             The newChild parameter is an object that implements
1582  *               the Node interface.
1583  *             This function can raise an object that implements
1584  *               the DOMException interface.
1585  *         hasChildNodes()
1586  *             This function returns a Boolean.
1587  *         cloneNode(deep)
1588  *             This function returns an object that implements
1589  *               the Node interface.
1590  *             The deep parameter is a Boolean. 
1591  *         normalize()
1592  *             This function has no return value. 
1593  *         isSupported(feature, version)
1594  *             This function returns a Boolean.
1595  *             The feature parameter is a String.
1596  *             The version parameter is a String. 
1597  *         hasAttributes()
1598  *             This function returns a Boolean.
1599  *         compareDocumentPosition(other)
1600  *             This function returns a Number.
1601  *             The other parameter is an object that implements
1602  *               the Node interface.
1603  *             This function can raise an object that implements
1604  *               the DOMException interface.
1605  *         isSameNode(other)
1606  *             This function returns a Boolean.
1607  *             The other parameter is an object that implements
1608  *               the Node interface. 
1609  *         lookupPrefix(namespaceURI)
1610  *             This function returns a String.
1611  *             The namespaceURI parameter is a String. 
1612  *         isDefaultNamespace(namespaceURI)
1613  *             This function returns a Boolean.
1614  *             The namespaceURI parameter is a String. 
1615  *         lookupNamespaceURI(prefix)
1616  *             This function returns a String.
1617  *             The prefix parameter is a String. 
1618  *         isEqualNode(arg)
1619  *             This function returns a Boolean.
1620  *             The arg parameter is an object that implements
1621  *               the Node interface. 
1622  *         getFeature(feature, version)
1623  *             This function returns an object that implements
1624  *               the Object interface.
1625  *             The feature parameter is a String.
1626  *             The version parameter is a String. 
1627  *         setUserData(key, data, handler)
1628  *             This function returns an object that implements
1629  *               the any type interface.
1630  *             The key parameter is a String.
1631  *             The data parameter is an object that implements
1632  *               the any type interface.
1633  *             The handler parameter is an object that implements
1634  *               the UserDataHandler interface. 
1635  *         getUserData(key)
1636  *             This function returns an object that implements
1637  *               the any type interface.
1638  *             The key parameter is a String. 
1639  * 
1640  */
1642 #undef CURRENT_CLASS
1643 #define CURRENT_CLASS  Node
1645 class CLASS_NAME(CURRENT_CLASS) : public Wrapper
1647 public:
1649      CLASS_NAME(CURRENT_CLASS)(JSContext*cx, JSObject *obj)
1650                     : Wrapper(cx, obj)
1651         {}
1652         
1653     ~CLASS_NAME(CURRENT_CLASS)()
1654         {}
1656     JSBool init(uintN argc, jsval *argv)
1657         {
1658         return JS_TRUE;
1659         }
1660         
1661     JSBool getProperty(jsval id, jsval *vp)
1662         {
1663         return JS_FALSE;
1664         }
1666     JSBool setProperty(jsval id, jsval *vp)
1667         {
1668         return JS_FALSE;
1669         }
1671         /**
1672          *
1673          */
1674     METHOD(getDOMImplementation)
1675         {
1676         return JS_FALSE;
1677         }
1678         
1680         /**
1681          *
1682          */
1683     METHOD(getDOMImplementationList)
1684         {
1685         return JS_FALSE;
1686         }
1688     enum
1689         {
1690         prop_code
1691         };
1693 };
1698 JSPropertySpec PROPERTY_TABLE(CURRENT_CLASS)[] = 
1699
1700     { 0 }
1701 };
1703 JSFunctionSpec METHOD_TABLE(CURRENT_CLASS)[] = 
1705     { 0 }
1706 };
1708 JSPropertySpec STATIC_PROPERTY_TABLE(CURRENT_CLASS)[] = 
1709
1710     { 0 }
1711 };
1713 JSFunctionSpec STATIC_METHOD_TABLE(CURRENT_CLASS)[] = 
1715     { 0 }
1716 };
1719 CONSTRUCTOR ( CURRENT_CLASS )
1726 //########################################################################
1727 //# NodeList
1728 //########################################################################
1730 /**
1731  * Objects that implement the NodeList interface:
1732  * 
1733  *     Properties of objects that implement the NodeList interface:
1734  * 
1735  *         length
1736  *             This read-only property is a Number. 
1737  * 
1738  *     Functions of objects that implement the NodeList interface:
1739  * 
1740  *         item(index)
1741  *             This function returns an object that implements
1742  *               the Node interface.
1743  *             The index parameter is a Number.
1744  *             Note: This object can also be dereferenced using square
1745  *               bracket notation (e.g. obj[1]). Dereferencing with
1746  *               an integer index is equivalent to invoking the item
1747  *               function with that index.
1748  * 
1749  * 
1750  */
1752 #undef CURRENT_CLASS
1753 #define CURRENT_CLASS  NodeList
1755 class CLASS_NAME(CURRENT_CLASS) : public Wrapper
1757 public:
1759      CLASS_NAME(CURRENT_CLASS)(JSContext*cx, JSObject *obj)
1760                     : Wrapper(cx, obj)
1761         {}
1762         
1763     ~CLASS_NAME(CURRENT_CLASS)()
1764         {}
1766     JSBool init(uintN argc, jsval *argv)
1767         {
1768         return JS_TRUE;
1769         }
1770         
1771     JSBool getProperty(jsval id, jsval *vp)
1772         {
1773         return JS_FALSE;
1774         }
1776     JSBool setProperty(jsval id, jsval *vp)
1777         {
1778         return JS_FALSE;
1779         }
1781         /**
1782          *
1783          */
1784     METHOD(getDOMImplementation)
1785         {
1786         return JS_FALSE;
1787         }
1788         
1790         /**
1791          *
1792          */
1793     METHOD(getDOMImplementationList)
1794         {
1795         return JS_FALSE;
1796         }
1798     enum
1799         {
1800         prop_code
1801         };
1803 };
1808 JSPropertySpec PROPERTY_TABLE(CURRENT_CLASS)[] = 
1809
1810     { 0 }
1811 };
1813 JSFunctionSpec METHOD_TABLE(CURRENT_CLASS)[] = 
1815     { 0 }
1816 };
1818 JSPropertySpec STATIC_PROPERTY_TABLE(CURRENT_CLASS)[] = 
1819
1820     { 0 }
1821 };
1823 JSFunctionSpec STATIC_METHOD_TABLE(CURRENT_CLASS)[] = 
1825     { 0 }
1826 };
1829 CONSTRUCTOR ( CURRENT_CLASS )
1835 //########################################################################
1836 //# NamedNodeMap
1837 //########################################################################
1839 /**
1840  * Objects that implement the NamedNodeMap interface:
1841  * 
1842  *     Properties of objects that implement the NamedNodeMap interface:
1843  * 
1844  *         length
1845  *             This read-only property is a Number. 
1846  * 
1847  *     Functions of objects that implement the NamedNodeMap interface:
1848  * 
1849  *         getNamedItem(name)
1850  *             This function returns an object that implements
1851  *               the Node interface.
1852  *             The name parameter is a String. 
1853  *         setNamedItem(arg)
1854  *             This function returns an object that implements
1855  *               the Node interface.
1856  *             The arg parameter is an object that implements
1857  *               the Node interface.
1858  *             This function can raise an object that implements
1859  *               the DOMException interface.
1860  *         removeNamedItem(name)
1861  *             This function returns an object that implements
1862  *               the Node interface.
1863  *             The name parameter is a String.
1864  *             This function can raise an object that implements
1865  *               the DOMException interface.
1866  *         item(index)
1867  *             This function returns an object that implements
1868  *               the Node interface.
1869  *             The index parameter is a Number.
1870  *             Note: This object can also be dereferenced using square
1871  *               bracket notation (e.g. obj[1]). Dereferencing with
1872  *               an integer index is equivalent to invoking the item
1873  *               function with that index.
1874  *         getNamedItemNS(namespaceURI, localName)
1875  *             This function returns an object that implements
1876  *               the Node interface.
1877  *             The namespaceURI parameter is a String.
1878  *             The localName parameter is a String.
1879  *             This function can raise an object that implements
1880  *               the DOMException interface.
1881  *         setNamedItemNS(arg)
1882  *             This function returns an object that implements
1883  *               the Node interface.
1884  *             The arg parameter is an object that implements
1885  *               the Node interface.
1886  *             This function can raise an object that implements
1887  *               the DOMException interface.
1888  *         removeNamedItemNS(namespaceURI, localName)
1889  *             This function returns an object that implements
1890  *               the Node interface.
1891  *             The namespaceURI parameter is a String.
1892  *             The localName parameter is a String.
1893  *             This function can raise an object that implements
1894  *               the DOMException interface. 
1895  */
1898 #undef CURRENT_CLASS
1899 #define CURRENT_CLASS  NamedNodeMap
1901 class CLASS_NAME(CURRENT_CLASS) : public Wrapper
1903 public:
1905      CLASS_NAME(CURRENT_CLASS)(JSContext*cx, JSObject *obj)
1906                     : Wrapper(cx, obj)
1907         {}
1908         
1909     ~CLASS_NAME(CURRENT_CLASS)()
1910         {}
1912     JSBool init(uintN argc, jsval *argv)
1913         {
1914         return JS_TRUE;
1915         }
1916         
1917     JSBool getProperty(jsval id, jsval *vp)
1918         {
1919         return JS_FALSE;
1920         }
1922     JSBool setProperty(jsval id, jsval *vp)
1923         {
1924         return JS_FALSE;
1925         }
1927         /**
1928          *
1929          */
1930     METHOD(getDOMImplementation)
1931         {
1932         return JS_FALSE;
1933         }
1934         
1936         /**
1937          *
1938          */
1939     METHOD(getDOMImplementationList)
1940         {
1941         return JS_FALSE;
1942         }
1944     enum
1945         {
1946         prop_code
1947         };
1949 };
1954 JSPropertySpec PROPERTY_TABLE(CURRENT_CLASS)[] = 
1955
1956     { 0 }
1957 };
1959 JSFunctionSpec METHOD_TABLE(CURRENT_CLASS)[] = 
1961     { 0 }
1962 };
1964 JSPropertySpec STATIC_PROPERTY_TABLE(CURRENT_CLASS)[] = 
1965
1966     { 0 }
1967 };
1969 JSFunctionSpec STATIC_METHOD_TABLE(CURRENT_CLASS)[] = 
1971     { 0 }
1972 };
1975 CONSTRUCTOR ( CURRENT_CLASS )
1982 //########################################################################
1983 //# CharacterData
1984 //########################################################################
1986 /**
1987  * Objects that implement the CharacterData interface:
1988  * 
1989  *     Objects that implement the CharacterData interface have all
1990  *     properties and functions of the Node interface as well as
1991  *     the properties and functions defined below. Properties
1992  *     of objects that implement the CharacterData interface:
1993  * 
1994  * 
1995  *         data
1996  *             This property is a String, can raise an object
1997  *             that implements the DOMException interface on setting
1998  *             and can raise an object that implements the DOMException 
1999  *             interface on retrieval.
2000  *         length
2001  *             This read-only property is a Number. 
2002  * 
2003  *     Functions of objects that implement the CharacterData interface:
2004  * 
2005  *         substringData(offset, count)
2006  *             This function returns a String.
2007  *             The offset parameter is a Number.
2008  *             The count parameter is a Number.
2009  *             This function can raise an object that implements
2010  *               the DOMException interface.
2011  *         appendData(arg)
2012  *             This function has no return value.
2013  *             The arg parameter is a String.
2014  *             This function can raise an object that implements
2015  *               the DOMException interface.
2016  *         insertData(offset, arg)
2017  *             This function has no return value.
2018  *             The offset parameter is a Number.
2019  *             The arg parameter is a String.
2020  *             This function can raise an object that implements
2021  *               the DOMException interface.
2022  *         deleteData(offset, count)
2023  *             This function has no return value.
2024  *             The offset parameter is a Number.
2025  *             The count parameter is a Number.
2026  *             This function can raise an object that implements
2027  *               the DOMException interface.
2028  *         replaceData(offset, count, arg)
2029  *             This function has no return value.
2030  *             The offset parameter is a Number.
2031  *             The count parameter is a Number.
2032  *             The arg parameter is a String.
2033  *             This function can raise an object that implements
2034  *               the DOMException interface. 
2035  */
2037 #undef CURRENT_CLASS
2038 #define CURRENT_CLASS  CharacterData
2040 class CLASS_NAME(CURRENT_CLASS) : public Wrapper
2042 public:
2044      CLASS_NAME(CURRENT_CLASS)(JSContext*cx, JSObject *obj)
2045                     : Wrapper(cx, obj)
2046         {}
2047         
2048     ~CLASS_NAME(CURRENT_CLASS)()
2049         {}
2051     JSBool init(uintN argc, jsval *argv)
2052         {
2053         return JS_TRUE;
2054         }
2055         
2056     JSBool getProperty(jsval id, jsval *vp)
2057         {
2058         return JS_FALSE;
2059         }
2061     JSBool setProperty(jsval id, jsval *vp)
2062         {
2063         return JS_FALSE;
2064         }
2066         /**
2067          *
2068          */
2069     METHOD(getDOMImplementation)
2070         {
2071         return JS_FALSE;
2072         }
2073         
2075         /**
2076          *
2077          */
2078     METHOD(getDOMImplementationList)
2079         {
2080         return JS_FALSE;
2081         }
2083     enum
2084         {
2085         prop_code
2086         };
2088 };
2093 JSPropertySpec PROPERTY_TABLE(CURRENT_CLASS)[] = 
2094
2095     { 0 }
2096 };
2098 JSFunctionSpec METHOD_TABLE(CURRENT_CLASS)[] = 
2100     { 0 }
2101 };
2103 JSPropertySpec STATIC_PROPERTY_TABLE(CURRENT_CLASS)[] = 
2104
2105     { 0 }
2106 };
2108 JSFunctionSpec STATIC_METHOD_TABLE(CURRENT_CLASS)[] = 
2110     { 0 }
2111 };
2114 CONSTRUCTOR ( CURRENT_CLASS )
2123 //########################################################################
2124 //# Attr
2125 //########################################################################
2127 /**
2128  * Objects that implement the Attr interface:
2129  * 
2130  *     Objects that implement the Attr interface have all properties
2131  *     and functions of the Node interface as well as the properties
2132  *     and functions defined below. 
2133  *     Properties of objects that implement the Attr interface:
2134  * 
2135  * 
2136  *         name
2137  *             This read-only property is a String.
2138  *         specified
2139  *             This read-only property is a Boolean.
2140  *         value
2141  *             This property is a String and can raise an object
2142  *             that implements the DOMException interface on setting.
2143  *         ownerElement
2144  *             This read-only property is an object that implements
2145  *               the Element interface.
2146  *         schemaTypeInfo
2147  *             This read-only property is an object that implements
2148  *               the TypeInfo interface.
2149  *         isId
2150  *             This read-only property is a Boolean. 
2151  * 
2152  */
2154 #undef CURRENT_CLASS
2155 #define CURRENT_CLASS  Attr
2157 class CLASS_NAME(CURRENT_CLASS) : public Wrapper
2159 public:
2161      CLASS_NAME(CURRENT_CLASS)(JSContext*cx, JSObject *obj)
2162                     : Wrapper(cx, obj)
2163         {}
2164         
2165     ~CLASS_NAME(CURRENT_CLASS)()
2166         {}
2168     JSBool init(uintN argc, jsval *argv)
2169         {
2170         return JS_TRUE;
2171         }
2172         
2173     JSBool getProperty(jsval id, jsval *vp)
2174         {
2175         return JS_FALSE;
2176         }
2178     JSBool setProperty(jsval id, jsval *vp)
2179         {
2180         return JS_FALSE;
2181         }
2183         /**
2184          *
2185          */
2186     METHOD(getDOMImplementation)
2187         {
2188         return JS_FALSE;
2189         }
2190         
2192         /**
2193          *
2194          */
2195     METHOD(getDOMImplementationList)
2196         {
2197         return JS_FALSE;
2198         }
2200     enum
2201         {
2202         prop_code
2203         };
2205 };
2210 JSPropertySpec PROPERTY_TABLE(CURRENT_CLASS)[] = 
2211
2212     { 0 }
2213 };
2215 JSFunctionSpec METHOD_TABLE(CURRENT_CLASS)[] = 
2217     { 0 }
2218 };
2220 JSPropertySpec STATIC_PROPERTY_TABLE(CURRENT_CLASS)[] = 
2221
2222     { 0 }
2223 };
2225 JSFunctionSpec STATIC_METHOD_TABLE(CURRENT_CLASS)[] = 
2227     { 0 }
2228 };
2231 CONSTRUCTOR ( CURRENT_CLASS )
2237 //########################################################################
2238 //# Element
2239 //########################################################################
2241 /**
2242  * Objects that implement the Element interface:
2243  * 
2244  *     Objects that implement the Element interface have all properties
2245  *     and functions of the Node interface as well as the properties
2246  *     and functions defined below. 
2247  *     Properties of objects that implement the Element interface:
2248  * 
2249  * 
2250  *         tagName
2251  *             This read-only property is a String.
2252  *         schemaTypeInfo
2253  *             This read-only property is an object that implements
2254  *               the TypeInfo interface. 
2255  * 
2256  *     Functions of objects that implement the Element interface:
2257  * 
2258  *         getAttribute(name)
2259  *             This function returns a String.
2260  *             The name parameter is a String. 
2261  *         setAttribute(name, value)
2262  *             This function has no return value.
2263  *             The name parameter is a String.
2264  *             The value parameter is a String.
2265  *             This function can raise an object that implements
2266  *               the DOMException interface.
2267  *         removeAttribute(name)
2268  *             This function has no return value.
2269  *             The name parameter is a String.
2270  *             This function can raise an object that implements
2271  *               the DOMException interface.
2272  *         getAttributeNode(name)
2273  *             This function returns an object that implements
2274  *               the Attr interface.
2275  *             The name parameter is a String. 
2276  *         setAttributeNode(newAttr)
2277  *             This function returns an object that implements
2278  *               the Attr interface.
2279  *             The newAttr parameter is an object that implements
2280  *               the Attr interface.
2281  *             This function can raise an object that implements
2282  *               the DOMException interface.
2283  *         removeAttributeNode(oldAttr)
2284  *             This function returns an object that implements
2285  *               the Attr interface.
2286  *             The oldAttr parameter is an object that implements
2287  *               the Attr interface.
2288  *             This function can raise an object that implements
2289  *               the DOMException interface.
2290  *         getElementsByTagName(name)
2291  *             This function returns an object that implements
2292  *               the NodeList interface.
2293  *             The name parameter is a String. 
2294  *         getAttributeNS(namespaceURI, localName)
2295  *             This function returns a String.
2296  *             The namespaceURI parameter is a String.
2297  *             The localName parameter is a String.
2298  *             This function can raise an object that implements
2299  *               the DOMException interface.
2300  *         setAttributeNS(namespaceURI, qualifiedName, value)
2301  *             This function has no return value.
2302  *             The namespaceURI parameter is a String.
2303  *             The qualifiedName parameter is a String.
2304  *             The value parameter is a String.
2305  *             This function can raise an object that implements
2306  *               the DOMException interface.
2307  *         removeAttributeNS(namespaceURI, localName)
2308  *             This function has no return value.
2309  *             The namespaceURI parameter is a String.
2310  *             The localName parameter is a String.
2311  *             This function can raise an object that implements
2312  *               the DOMException interface.
2313  *         getAttributeNodeNS(namespaceURI, localName)
2314  *             This function returns an object that implements
2315  *               the Attr interface.
2316  *             The namespaceURI parameter is a String.
2317  *             The localName parameter is a String.
2318  *             This function can raise an object that implements
2319  *               the DOMException interface.
2320  *         setAttributeNodeNS(newAttr)
2321  *             This function returns an object that implements
2322  *               the Attr interface.
2323  *             The newAttr parameter is an object that implements
2324  *               the Attr interface.
2325  *             This function can raise an object that implements
2326  *               the DOMException interface.
2327  *         getElementsByTagNameNS(namespaceURI, localName)
2328  *             This function returns an object that implements
2329  *               the NodeList interface.
2330  *             The namespaceURI parameter is a String.
2331  *             The localName parameter is a String.
2332  *             This function can raise an object that implements
2333  *               the DOMException interface.
2334  *         hasAttribute(name)
2335  *             This function returns a Boolean.
2336  *             The name parameter is a String. 
2337  *         hasAttributeNS(namespaceURI, localName)
2338  *             This function returns a Boolean.
2339  *             The namespaceURI parameter is a String.
2340  *             The localName parameter is a String.
2341  *             This function can raise an object that implements
2342  *               the DOMException interface.
2343  *         setIdAttribute(name, isId)
2344  *             This function has no return value.
2345  *             The name parameter is a String.
2346  *             The isId parameter is a Boolean.
2347  *             This function can raise an object that implements
2348  *               the DOMException interface.
2349  *         setIdAttributeNS(namespaceURI, localName, isId)
2350  *             This function has no return value.
2351  *             The namespaceURI parameter is a String.
2352  *             The localName parameter is a String.
2353  *             The isId parameter is a Boolean.
2354  *             This function can raise an object that implements
2355  *               the DOMException interface.
2356  *         setIdAttributeNode(idAttr, isId)
2357  *             This function has no return value.
2358  *             The idAttr parameter is an object that implements
2359  *               the Attr interface.
2360  *             The isId parameter is a Boolean.
2361  *             This function can raise an object that implements
2362  *               the DOMException interface. 
2363  */
2365 #undef CURRENT_CLASS
2366 #define CURRENT_CLASS  Element
2368 class CLASS_NAME(CURRENT_CLASS) : public Wrapper
2370 public:
2372      CLASS_NAME(CURRENT_CLASS)(JSContext*cx, JSObject *obj)
2373                     : Wrapper(cx, obj)
2374         {}
2375         
2376     ~CLASS_NAME(CURRENT_CLASS)()
2377         {}
2379     JSBool init(uintN argc, jsval *argv)
2380         {
2381         return JS_TRUE;
2382         }
2383         
2384     JSBool getProperty(jsval id, jsval *vp)
2385         {
2386         return JS_FALSE;
2387         }
2389     JSBool setProperty(jsval id, jsval *vp)
2390         {
2391         return JS_FALSE;
2392         }
2394         /**
2395          *
2396          */
2397     METHOD(getDOMImplementation)
2398         {
2399         return JS_FALSE;
2400         }
2401         
2403         /**
2404          *
2405          */
2406     METHOD(getDOMImplementationList)
2407         {
2408         return JS_FALSE;
2409         }
2411     enum
2412         {
2413         prop_code
2414         };
2416 };
2421 JSPropertySpec PROPERTY_TABLE(CURRENT_CLASS)[] = 
2422
2423     { 0 }
2424 };
2426 JSFunctionSpec METHOD_TABLE(CURRENT_CLASS)[] = 
2428     { 0 }
2429 };
2431 JSPropertySpec STATIC_PROPERTY_TABLE(CURRENT_CLASS)[] = 
2432
2433     { 0 }
2434 };
2436 JSFunctionSpec STATIC_METHOD_TABLE(CURRENT_CLASS)[] = 
2438     { 0 }
2439 };
2442 CONSTRUCTOR ( CURRENT_CLASS )
2449 //########################################################################
2450 //# Text
2451 //########################################################################
2453 /**
2454  * Objects that implement the Text interface:
2455  * 
2456  *     Objects that implement the Text interface have all properties
2457  *     and functions of the CharacterData interface as well as
2458  *     the properties and functions defined below. Properties of objects
2459  *     that implement the Text interface:
2460  * 
2461  * 
2462  *         isElementContentWhitespace
2463  *             This read-only property is a Boolean.
2464  *         wholeText
2465  *             This read-only property is a String. 
2466  * 
2467  *     Functions of objects that implement the Text interface:
2468  * 
2469  *         splitText(offset)
2470  *             This function returns an object that implements
2471  *               the Text interface.
2472  *             The offset parameter is a Number.
2473  *             This function can raise an object that implements
2474  *               the DOMException interface.
2475  *         replaceWholeText(content)
2476  *             This function returns an object that implements
2477  *               the Text interface.
2478  *             The content parameter is a String.
2479  *             This function can raise an object that implements
2480  *               the DOMException interface. 
2481  */
2483 #undef CURRENT_CLASS
2484 #define CURRENT_CLASS  Text
2486 class CLASS_NAME(CURRENT_CLASS) : public Wrapper
2488 public:
2490      CLASS_NAME(CURRENT_CLASS)(JSContext*cx, JSObject *obj)
2491                     : Wrapper(cx, obj)
2492         {}
2493         
2494     ~CLASS_NAME(CURRENT_CLASS)()
2495         {}
2497     JSBool init(uintN argc, jsval *argv)
2498         {
2499         return JS_TRUE;
2500         }
2501         
2502     JSBool getProperty(jsval id, jsval *vp)
2503         {
2504         return JS_FALSE;
2505         }
2507     JSBool setProperty(jsval id, jsval *vp)
2508         {
2509         return JS_FALSE;
2510         }
2512         /**
2513          *
2514          */
2515     METHOD(getDOMImplementation)
2516         {
2517         return JS_FALSE;
2518         }
2519         
2521         /**
2522          *
2523          */
2524     METHOD(getDOMImplementationList)
2525         {
2526         return JS_FALSE;
2527         }
2529     enum
2530         {
2531         prop_code
2532         };
2534 };
2539 JSPropertySpec PROPERTY_TABLE(CURRENT_CLASS)[] = 
2540
2541     { 0 }
2542 };
2544 JSFunctionSpec METHOD_TABLE(CURRENT_CLASS)[] = 
2546     { 0 }
2547 };
2549 JSPropertySpec STATIC_PROPERTY_TABLE(CURRENT_CLASS)[] = 
2550
2551     { 0 }
2552 };
2554 JSFunctionSpec STATIC_METHOD_TABLE(CURRENT_CLASS)[] = 
2556     { 0 }
2557 };
2560 CONSTRUCTOR ( CURRENT_CLASS )
2567 //########################################################################
2568 //# Comment
2569 //########################################################################
2571 /**
2572  * Objects that implement the Comment interface:
2573  * 
2574  *     Objects that implement the Comment interface have all properties
2575  *     and functions of the CharacterData interface.
2576  * 
2577  */
2579 #undef CURRENT_CLASS
2580 #define CURRENT_CLASS  Comment
2582 class CLASS_NAME(CURRENT_CLASS) : public Wrapper
2584 public:
2586      CLASS_NAME(CURRENT_CLASS)(JSContext*cx, JSObject *obj)
2587                     : Wrapper(cx, obj)
2588         {}
2589         
2590     ~CLASS_NAME(CURRENT_CLASS)()
2591         {}
2593     JSBool init(uintN argc, jsval *argv)
2594         {
2595         return JS_TRUE;
2596         }
2597         
2598     JSBool getProperty(jsval id, jsval *vp)
2599         {
2600         return JS_FALSE;
2601         }
2603     JSBool setProperty(jsval id, jsval *vp)
2604         {
2605         return JS_FALSE;
2606         }
2608         /**
2609          *
2610          */
2611     METHOD(getDOMImplementation)
2612         {
2613         return JS_FALSE;
2614         }
2615         
2617         /**
2618          *
2619          */
2620     METHOD(getDOMImplementationList)
2621         {
2622         return JS_FALSE;
2623         }
2625     enum
2626         {
2627         prop_code
2628         };
2630 };
2635 JSPropertySpec PROPERTY_TABLE(CURRENT_CLASS)[] = 
2636
2637     { 0 }
2638 };
2640 JSFunctionSpec METHOD_TABLE(CURRENT_CLASS)[] = 
2642     { 0 }
2643 };
2645 JSPropertySpec STATIC_PROPERTY_TABLE(CURRENT_CLASS)[] = 
2646
2647     { 0 }
2648 };
2650 JSFunctionSpec STATIC_METHOD_TABLE(CURRENT_CLASS)[] = 
2652     { 0 }
2653 };
2656 CONSTRUCTOR ( CURRENT_CLASS )
2664 //########################################################################
2665 //# TypeInfo
2666 //########################################################################
2668 /**
2669  * Properties of the TypeInfo Constructor function:
2670  * 
2671  *     TypeInfo.DERIVATION_RESTRICTION
2672  *         The value of the constant TypeInfo.DERIVATION_RESTRICTION
2673  *           is 0x00000001.
2674  *     TypeInfo.DERIVATION_EXTENSION
2675  *         The value of the constant TypeInfo.DERIVATION_EXTENSION
2676  *           is 0x00000002.
2677  *     TypeInfo.DERIVATION_UNION
2678  *         The value of the constant TypeInfo.DERIVATION_UNION
2679  *           is 0x00000004.
2680  *     TypeInfo.DERIVATION_LIST
2681  *         The value of the constant TypeInfo.DERIVATION_LIST
2682  *           is 0x00000008. 
2683  * 
2684  * Objects that implement the TypeInfo interface:
2685  * 
2686  *     Properties of objects that implement the TypeInfo interface:
2687  * 
2688  *         typeName
2689  *             This read-only property is a String.
2690  *         typeNamespace
2691  *             This read-only property is a String. 
2692  * 
2693  *     Functions of objects that implement the TypeInfo interface:
2694  * 
2695  *         isDerivedFrom(typeNamespaceArg, typeNameArg, derivationMethod)
2696  *             This function returns a Boolean.
2697  *             The typeNamespaceArg parameter is a String.
2698  *             The typeNameArg parameter is a String.
2699  *             The derivationMethod parameter is a Number. 
2700  */
2702 #undef CURRENT_CLASS
2703 #define CURRENT_CLASS  TypeInfo
2705 class CLASS_NAME(CURRENT_CLASS) : public Wrapper
2707 public:
2709      CLASS_NAME(CURRENT_CLASS)(JSContext*cx, JSObject *obj)
2710                     : Wrapper(cx, obj)
2711         {}
2712         
2713     ~CLASS_NAME(CURRENT_CLASS)()
2714         {}
2716     JSBool init(uintN argc, jsval *argv)
2717         {
2718         return JS_TRUE;
2719         }
2720         
2721     JSBool getProperty(jsval id, jsval *vp)
2722         {
2723         return JS_FALSE;
2724         }
2726     JSBool setProperty(jsval id, jsval *vp)
2727         {
2728         return JS_FALSE;
2729         }
2731         /**
2732          *
2733          */
2734     METHOD(getDOMImplementation)
2735         {
2736         return JS_FALSE;
2737         }
2738         
2740         /**
2741          *
2742          */
2743     METHOD(getDOMImplementationList)
2744         {
2745         return JS_FALSE;
2746         }
2748     enum
2749         {
2750         prop_code
2751         };
2753 };
2758 JSPropertySpec PROPERTY_TABLE(CURRENT_CLASS)[] = 
2759
2760     { 0 }
2761 };
2763 JSFunctionSpec METHOD_TABLE(CURRENT_CLASS)[] = 
2765     { 0 }
2766 };
2768 JSPropertySpec STATIC_PROPERTY_TABLE(CURRENT_CLASS)[] = 
2769
2770     { 0 }
2771 };
2773 JSFunctionSpec STATIC_METHOD_TABLE(CURRENT_CLASS)[] = 
2775     { 0 }
2776 };
2779 CONSTRUCTOR ( CURRENT_CLASS )
2789 //########################################################################
2790 //# UserDataHandler
2791 //########################################################################
2793 /**
2794  * Properties of the UserDataHandler Constructor function:
2795  * 
2796  *     UserDataHandler.NODE_CLONED
2797  *         The value of the constant UserDataHandler.NODE_CLONED is 1.
2798  *     UserDataHandler.NODE_IMPORTED
2799  *         The value of the constant UserDataHandler.NODE_IMPORTED is 2.
2800  *     UserDataHandler.NODE_DELETED
2801  *         The value of the constant UserDataHandler.NODE_DELETED is 3.
2802  *     UserDataHandler.NODE_RENAMED
2803  *         The value of the constant UserDataHandler.NODE_RENAMED is 4.
2804  *     UserDataHandler.NODE_ADOPTED
2805  *         The value of the constant UserDataHandler.NODE_ADOPTED is 5. 
2806  * 
2807  * UserDataHandler function:
2808  *     This function has no return value.
2809  *     The first parameter is a Number.
2810  *     The second parameter is a String.
2811  *     The third parameter is an object that implements the any 
2812  *       type interface.
2813  *     The fourth parameter is an object that implements the Node 
2814  *       interface.
2815  *     The fifth parameter is an object that implements the Node interface. 
2816  *     Properties of the DOMError Constructor function:
2817  * 
2818  * 
2819  *     DOMError.SEVERITY_WARNING
2820  *         The value of the constant DOMError.SEVERITY_WARNING is 1.
2821  *     DOMError.SEVERITY_ERROR
2822  *         The value of the constant DOMError.SEVERITY_ERROR is 2.
2823  *     DOMError.SEVERITY_FATAL_ERROR
2824  *         The value of the constant DOMError.SEVERITY_FATAL_ERROR is 3. 
2825  */
2828 #undef CURRENT_CLASS
2829 #define CURRENT_CLASS  UserDataHandler
2831 class CLASS_NAME(CURRENT_CLASS) : public Wrapper
2833 public:
2835      CLASS_NAME(CURRENT_CLASS)(JSContext*cx, JSObject *obj)
2836                     : Wrapper(cx, obj)
2837         {}
2838         
2839     ~CLASS_NAME(CURRENT_CLASS)()
2840         {}
2842     JSBool init(uintN argc, jsval *argv)
2843         {
2844         return JS_TRUE;
2845         }
2846         
2847     JSBool getProperty(jsval id, jsval *vp)
2848         {
2849         return JS_FALSE;
2850         }
2852     JSBool setProperty(jsval id, jsval *vp)
2853         {
2854         return JS_FALSE;
2855         }
2857         /**
2858          *
2859          */
2860     METHOD(getDOMImplementation)
2861         {
2862         return JS_FALSE;
2863         }
2864         
2866         /**
2867          *
2868          */
2869     METHOD(getDOMImplementationList)
2870         {
2871         return JS_FALSE;
2872         }
2874     enum
2875         {
2876         prop_code
2877         };
2879 };
2884 JSPropertySpec PROPERTY_TABLE(CURRENT_CLASS)[] = 
2885
2886     { 0 }
2887 };
2889 JSFunctionSpec METHOD_TABLE(CURRENT_CLASS)[] = 
2891     { 0 }
2892 };
2894 JSPropertySpec STATIC_PROPERTY_TABLE(CURRENT_CLASS)[] = 
2895
2896     { 0 }
2897 };
2899 JSFunctionSpec STATIC_METHOD_TABLE(CURRENT_CLASS)[] = 
2901     { 0 }
2902 };
2905 CONSTRUCTOR ( CURRENT_CLASS )
2911 //########################################################################
2912 //# DOMError
2913 //########################################################################
2915 /**
2916  * Objects that implement the DOMError interface:
2917  * 
2918  *     Properties of objects that implement the DOMError interface:
2919  * 
2920  *         severity
2921  *             This read-only property is a Number.
2922  *         message
2923  *             This read-only property is a String.
2924  *         type
2925  *             This read-only property is a String.
2926  *         relatedException
2927  *             This read-only property is an object that implements
2928  *               the Object interface.
2929  *         relatedData
2930  *             This read-only property is an object that implements
2931  *               the Object interface.
2932  *         location
2933  *             This read-only property is an object that implements
2934  *               the DOMLocator interface. 
2935  * 
2936  * DOMErrorHandler function:
2937  *     This function returns a Boolean.
2938  *     The parameter is an object that implements the 
2939  *       DOMError interface.
2940  * 
2941  * 
2942  */
2944 #undef CURRENT_CLASS
2945 #define CURRENT_CLASS  DOMError
2947 class CLASS_NAME(CURRENT_CLASS) : public Wrapper
2949 public:
2951      CLASS_NAME(CURRENT_CLASS)(JSContext*cx, JSObject *obj)
2952                     : Wrapper(cx, obj)
2953         {}
2954         
2955     ~CLASS_NAME(CURRENT_CLASS)()
2956         {}
2958     JSBool init(uintN argc, jsval *argv)
2959         {
2960         return JS_TRUE;
2961         }
2962         
2963     JSBool getProperty(jsval id, jsval *vp)
2964         {
2965         return JS_FALSE;
2966         }
2968     JSBool setProperty(jsval id, jsval *vp)
2969         {
2970         return JS_FALSE;
2971         }
2973         /**
2974          *
2975          */
2976     METHOD(getDOMImplementation)
2977         {
2978         return JS_FALSE;
2979         }
2980         
2982         /**
2983          *
2984          */
2985     METHOD(getDOMImplementationList)
2986         {
2987         return JS_FALSE;
2988         }
2990     enum
2991         {
2992         prop_code
2993         };
2995 };
3000 JSPropertySpec PROPERTY_TABLE(CURRENT_CLASS)[] = 
3001
3002     { 0 }
3003 };
3005 JSFunctionSpec METHOD_TABLE(CURRENT_CLASS)[] = 
3007     { 0 }
3008 };
3010 JSPropertySpec STATIC_PROPERTY_TABLE(CURRENT_CLASS)[] = 
3011
3012     { 0 }
3013 };
3015 JSFunctionSpec STATIC_METHOD_TABLE(CURRENT_CLASS)[] = 
3017     { 0 }
3018 };
3021 CONSTRUCTOR ( CURRENT_CLASS )
3028 //########################################################################
3029 //# DOMLocator
3030 //########################################################################
3032 /**
3033  * Objects that implement the DOMLocator interface:
3034  * 
3035  *     Properties of objects that implement the DOMLocator interface:
3036  * 
3037  *         lineNumber
3038  *             This read-only property is a Number.
3039  *         columnNumber
3040  *             This read-only property is a Number.
3041  *         byteOffset
3042  *             This read-only property is a Number.
3043  *         utf16Offset
3044  *             This read-only property is a Number.
3045  *         relatedNode
3046  *             This read-only property is an object that implements
3047  *               the Node interface.
3048  *         uri
3049  *             This read-only property is a String. 
3050  */
3052 #undef CURRENT_CLASS
3053 #define CURRENT_CLASS  DOMLocator
3055 class CLASS_NAME(CURRENT_CLASS) : public Wrapper
3057 public:
3059      CLASS_NAME(CURRENT_CLASS)(JSContext*cx, JSObject *obj)
3060                     : Wrapper(cx, obj)
3061         {}
3062         
3063     ~CLASS_NAME(CURRENT_CLASS)()
3064         {}
3066     JSBool init(uintN argc, jsval *argv)
3067         {
3068         return JS_TRUE;
3069         }
3070         
3071     JSBool getProperty(jsval id, jsval *vp)
3072         {
3073         return JS_FALSE;
3074         }
3076     JSBool setProperty(jsval id, jsval *vp)
3077         {
3078         return JS_FALSE;
3079         }
3081         /**
3082          *
3083          */
3084     METHOD(getDOMImplementation)
3085         {
3086         return JS_FALSE;
3087         }
3088         
3090         /**
3091          *
3092          */
3093     METHOD(getDOMImplementationList)
3094         {
3095         return JS_FALSE;
3096         }
3098     enum
3099         {
3100         prop_code
3101         };
3103 };
3108 JSPropertySpec PROPERTY_TABLE(CURRENT_CLASS)[] = 
3109
3110     { 0 }
3111 };
3113 JSFunctionSpec METHOD_TABLE(CURRENT_CLASS)[] = 
3115     { 0 }
3116 };
3118 JSPropertySpec STATIC_PROPERTY_TABLE(CURRENT_CLASS)[] = 
3119
3120     { 0 }
3121 };
3123 JSFunctionSpec STATIC_METHOD_TABLE(CURRENT_CLASS)[] = 
3125     { 0 }
3126 };
3129 CONSTRUCTOR ( CURRENT_CLASS )
3138 //########################################################################
3139 //# DOMConfiguration
3140 //########################################################################
3142 /**
3143  * Objects that implement the DOMConfiguration interface:
3144  * 
3145  *     Properties of objects that implement the DOMConfiguration interface:
3146  * 
3147  *         parameterNames
3148  *             This read-only property is an object that implements
3149  *               the DOMStringList interface. 
3150  * 
3151  *     Functions of objects that implement the DOMConfiguration interface:
3152  * 
3153  *         setParameter(name, value)
3154  *             This function has no return value.
3155  *             The name parameter is a String.
3156  *             The value parameter is an object that implements
3157  *               the any type interface.
3158  *             This function can raise an object that implements
3159  *               the DOMException interface.
3160  *         getParameter(name)
3161  *             This function returns an object that implements
3162  *               the any type interface.
3163  *             The name parameter is a String.
3164  *             This function can raise an object that implements
3165  *               the DOMException interface.
3166  *         canSetParameter(name, value)
3167  *             This function returns a Boolean.
3168  *             The name parameter is a String.
3169  *             The value parameter is an object that implements
3170  *               the any type interface. 
3171  */
3174 #undef CURRENT_CLASS
3175 #define CURRENT_CLASS  DOMConfiguration
3177 class CLASS_NAME(CURRENT_CLASS) : public Wrapper
3179 public:
3181      CLASS_NAME(CURRENT_CLASS)(JSContext*cx, JSObject *obj)
3182                     : Wrapper(cx, obj)
3183         {}
3184         
3185     ~CLASS_NAME(CURRENT_CLASS)()
3186         {}
3188     JSBool init(uintN argc, jsval *argv)
3189         {
3190         return JS_TRUE;
3191         }
3192         
3193     JSBool getProperty(jsval id, jsval *vp)
3194         {
3195         return JS_FALSE;
3196         }
3198     JSBool setProperty(jsval id, jsval *vp)
3199         {
3200         return JS_FALSE;
3201         }
3203         /**
3204          *
3205          */
3206     METHOD(getDOMImplementation)
3207         {
3208         return JS_FALSE;
3209         }
3210         
3212         /**
3213          *
3214          */
3215     METHOD(getDOMImplementationList)
3216         {
3217         return JS_FALSE;
3218         }
3220     enum
3221         {
3222         prop_code
3223         };
3225 };
3230 JSPropertySpec PROPERTY_TABLE(CURRENT_CLASS)[] = 
3231
3232     { 0 }
3233 };
3235 JSFunctionSpec METHOD_TABLE(CURRENT_CLASS)[] = 
3237     { 0 }
3238 };
3240 JSPropertySpec STATIC_PROPERTY_TABLE(CURRENT_CLASS)[] = 
3241
3242     { 0 }
3243 };
3245 JSFunctionSpec STATIC_METHOD_TABLE(CURRENT_CLASS)[] = 
3247     { 0 }
3248 };
3251 CONSTRUCTOR ( CURRENT_CLASS )
3259 //########################################################################
3260 //# CDATASection
3261 //########################################################################
3263 /**
3264  * Objects that implement the CDATASection interface:
3265  * 
3266  *     Objects that implement the CDATASection interface
3267  *     have all properties and functions of the Text interface.
3268  * 
3269  */
3271 #undef CURRENT_CLASS
3272 #define CURRENT_CLASS  CDATASection
3274 class CLASS_NAME(CURRENT_CLASS) : public Wrapper
3276 public:
3278      CLASS_NAME(CURRENT_CLASS)(JSContext*cx, JSObject *obj)
3279                     : Wrapper(cx, obj)
3280         {}
3281         
3282     ~CLASS_NAME(CURRENT_CLASS)()
3283         {}
3285     JSBool init(uintN argc, jsval *argv)
3286         {
3287         return JS_TRUE;
3288         }
3289         
3290     JSBool getProperty(jsval id, jsval *vp)
3291         {
3292         return JS_FALSE;
3293         }
3295     JSBool setProperty(jsval id, jsval *vp)
3296         {
3297         return JS_FALSE;
3298         }
3300         /**
3301          *
3302          */
3303     METHOD(getDOMImplementation)
3304         {
3305         return JS_FALSE;
3306         }
3307         
3309         /**
3310          *
3311          */
3312     METHOD(getDOMImplementationList)
3313         {
3314         return JS_FALSE;
3315         }
3317     enum
3318         {
3319         prop_code
3320         };
3322 };
3327 JSPropertySpec PROPERTY_TABLE(CURRENT_CLASS)[] = 
3328
3329     { 0 }
3330 };
3332 JSFunctionSpec METHOD_TABLE(CURRENT_CLASS)[] = 
3334     { 0 }
3335 };
3337 JSPropertySpec STATIC_PROPERTY_TABLE(CURRENT_CLASS)[] = 
3338
3339     { 0 }
3340 };
3342 JSFunctionSpec STATIC_METHOD_TABLE(CURRENT_CLASS)[] = 
3344     { 0 }
3345 };
3348 CONSTRUCTOR ( CURRENT_CLASS )
3357 //########################################################################
3358 //# DocumentType
3359 //########################################################################
3361 /**
3362  * Objects that implement the DocumentType interface:
3363  * 
3364  *     Objects that implement the DocumentType interface have all
3365  *     properties and functions of the Node interface as well as
3366  *     the properties and functions defined below.
3367  *     Properties of objects that implement the DocumentType interface:
3368  * 
3369  * 
3370  *         name
3371  *             This read-only property is a String.
3372  *         entities
3373  *             This read-only property is an object that implements
3374  *               the NamedNodeMap interface.
3375  *         notations
3376  *             This read-only property is an object that implements
3377  *               the NamedNodeMap interface.
3378  *         publicId
3379  *             This read-only property is a String.
3380  *         systemId
3381  *             This read-only property is a String.
3382  *         internalSubset
3383  *             This read-only property is a String. 
3384  */
3387 #undef CURRENT_CLASS
3388 #define CURRENT_CLASS  DocumentType
3390 class CLASS_NAME(CURRENT_CLASS) : public Wrapper
3392 public:
3394      CLASS_NAME(CURRENT_CLASS)(JSContext*cx, JSObject *obj)
3395                     : Wrapper(cx, obj)
3396         {}
3397         
3398     ~CLASS_NAME(CURRENT_CLASS)()
3399         {}
3401     JSBool init(uintN argc, jsval *argv)
3402         {
3403         return JS_TRUE;
3404         }
3405         
3406     JSBool getProperty(jsval id, jsval *vp)
3407         {
3408         return JS_FALSE;
3409         }
3411     JSBool setProperty(jsval id, jsval *vp)
3412         {
3413         return JS_FALSE;
3414         }
3416         /**
3417          *
3418          */
3419     METHOD(getDOMImplementation)
3420         {
3421         return JS_FALSE;
3422         }
3423         
3425         /**
3426          *
3427          */
3428     METHOD(getDOMImplementationList)
3429         {
3430         return JS_FALSE;
3431         }
3433     enum
3434         {
3435         prop_code
3436         };
3438 };
3443 JSPropertySpec PROPERTY_TABLE(CURRENT_CLASS)[] = 
3444
3445     { 0 }
3446 };
3448 JSFunctionSpec METHOD_TABLE(CURRENT_CLASS)[] = 
3450     { 0 }
3451 };
3453 JSPropertySpec STATIC_PROPERTY_TABLE(CURRENT_CLASS)[] = 
3454
3455     { 0 }
3456 };
3458 JSFunctionSpec STATIC_METHOD_TABLE(CURRENT_CLASS)[] = 
3460     { 0 }
3461 };
3464 CONSTRUCTOR ( CURRENT_CLASS )
3470 //########################################################################
3471 //# Notation
3472 //########################################################################
3474 /**
3475  * Objects that implement the Notation interface:
3476  * 
3477  *     Objects that implement the Notation interface have all
3478  *     properties and functions of the Node interface as well as
3479  *     the properties and functions defined below. 
3480  *     Properties of objects that implement the Notation interface:
3481  * 
3482  * 
3483  *         publicId
3484  *             This read-only property is a String.
3485  *         systemId
3486  *             This read-only property is a String. 
3487  */
3489 #undef CURRENT_CLASS
3490 #define CURRENT_CLASS  Notation
3492 class CLASS_NAME(CURRENT_CLASS) : public Wrapper
3494 public:
3496      CLASS_NAME(CURRENT_CLASS)(JSContext*cx, JSObject *obj)
3497                     : Wrapper(cx, obj)
3498         {}
3499         
3500     ~CLASS_NAME(CURRENT_CLASS)()
3501         {}
3503     JSBool init(uintN argc, jsval *argv)
3504         {
3505         return JS_TRUE;
3506         }
3507         
3508     JSBool getProperty(jsval id, jsval *vp)
3509         {
3510         return JS_FALSE;
3511         }
3513     JSBool setProperty(jsval id, jsval *vp)
3514         {
3515         return JS_FALSE;
3516         }
3518         /**
3519          *
3520          */
3521     METHOD(getDOMImplementation)
3522         {
3523         return JS_FALSE;
3524         }
3525         
3527         /**
3528          *
3529          */
3530     METHOD(getDOMImplementationList)
3531         {
3532         return JS_FALSE;
3533         }
3535     enum
3536         {
3537         prop_code
3538         };
3540 };
3545 JSPropertySpec PROPERTY_TABLE(CURRENT_CLASS)[] = 
3546
3547     { 0 }
3548 };
3550 JSFunctionSpec METHOD_TABLE(CURRENT_CLASS)[] = 
3552     { 0 }
3553 };
3555 JSPropertySpec STATIC_PROPERTY_TABLE(CURRENT_CLASS)[] = 
3556
3557     { 0 }
3558 };
3560 JSFunctionSpec STATIC_METHOD_TABLE(CURRENT_CLASS)[] = 
3562     { 0 }
3563 };
3566 CONSTRUCTOR ( CURRENT_CLASS )
3574 //########################################################################
3575 //# Entity
3576 //########################################################################
3578 /**
3579  * Objects that implement the Entity interface:
3580  * 
3581  *     Objects that implement the Entity interface have all properties
3582  *     and functions of the Node interface as well as the properties
3583  *     and functions defined below. 
3584  *     Properties of objects that implement the Entity interface:
3585  * 
3586  * 
3587  *         publicId
3588  *             This read-only property is a String.
3589  *         systemId
3590  *             This read-only property is a String.
3591  *         notationName
3592  *             This read-only property is a String.
3593  *         inputEncoding
3594  *             This read-only property is a String.
3595  *         xmlEncoding
3596  *             This read-only property is a String.
3597  *         xmlVersion
3598  *             This read-only property is a String. 
3599  */
3601 #undef CURRENT_CLASS
3602 #define CURRENT_CLASS  Entity
3604 class CLASS_NAME(CURRENT_CLASS) : public Wrapper
3606 public:
3608      CLASS_NAME(CURRENT_CLASS)(JSContext*cx, JSObject *obj)
3609                     : Wrapper(cx, obj)
3610         {}
3611         
3612     ~CLASS_NAME(CURRENT_CLASS)()
3613         {}
3615     JSBool init(uintN argc, jsval *argv)
3616         {
3617         return JS_TRUE;
3618         }
3619         
3620     JSBool getProperty(jsval id, jsval *vp)
3621         {
3622         return JS_FALSE;
3623         }
3625     JSBool setProperty(jsval id, jsval *vp)
3626         {
3627         return JS_FALSE;
3628         }
3630         /**
3631          *
3632          */
3633     METHOD(getDOMImplementation)
3634         {
3635         return JS_FALSE;
3636         }
3637         
3639         /**
3640          *
3641          */
3642     METHOD(getDOMImplementationList)
3643         {
3644         return JS_FALSE;
3645         }
3647     enum
3648         {
3649         prop_code
3650         };
3652 };
3657 JSPropertySpec PROPERTY_TABLE(CURRENT_CLASS)[] = 
3658
3659     { 0 }
3660 };
3662 JSFunctionSpec METHOD_TABLE(CURRENT_CLASS)[] = 
3664     { 0 }
3665 };
3667 JSPropertySpec STATIC_PROPERTY_TABLE(CURRENT_CLASS)[] = 
3668
3669     { 0 }
3670 };
3672 JSFunctionSpec STATIC_METHOD_TABLE(CURRENT_CLASS)[] = 
3674     { 0 }
3675 };
3678 CONSTRUCTOR ( CURRENT_CLASS )
3686 //########################################################################
3687 //# EntityReference
3688 //########################################################################
3690 /**
3691  * Objects that implement the EntityReference interface:
3692  * 
3693  *     Objects that implement the EntityReference interface have all
3694  *     properties and functions of the Node interface.
3695  * 
3696  */
3699 #undef CURRENT_CLASS
3700 #define CURRENT_CLASS  EntityReference
3702 class CLASS_NAME(CURRENT_CLASS) : public Wrapper
3704 public:
3706      CLASS_NAME(CURRENT_CLASS)(JSContext*cx, JSObject *obj)
3707                     : Wrapper(cx, obj)
3708         {}
3709         
3710     ~CLASS_NAME(CURRENT_CLASS)()
3711         {}
3713     JSBool init(uintN argc, jsval *argv)
3714         {
3715         return JS_TRUE;
3716         }
3717         
3718     JSBool getProperty(jsval id, jsval *vp)
3719         {
3720         return JS_FALSE;
3721         }
3723     JSBool setProperty(jsval id, jsval *vp)
3724         {
3725         return JS_FALSE;
3726         }
3728         /**
3729          *
3730          */
3731     METHOD(getDOMImplementation)
3732         {
3733         return JS_FALSE;
3734         }
3735         
3737         /**
3738          *
3739          */
3740     METHOD(getDOMImplementationList)
3741         {
3742         return JS_FALSE;
3743         }
3745     enum
3746         {
3747         prop_code
3748         };
3750 };
3755 JSPropertySpec PROPERTY_TABLE(CURRENT_CLASS)[] = 
3756
3757     { 0 }
3758 };
3760 JSFunctionSpec METHOD_TABLE(CURRENT_CLASS)[] = 
3762     { 0 }
3763 };
3765 JSPropertySpec STATIC_PROPERTY_TABLE(CURRENT_CLASS)[] = 
3766
3767     { 0 }
3768 };
3770 JSFunctionSpec STATIC_METHOD_TABLE(CURRENT_CLASS)[] = 
3772     { 0 }
3773 };
3776 CONSTRUCTOR ( CURRENT_CLASS )
3783 //########################################################################
3784 //# ProcessingInstruction
3785 //########################################################################
3787 /**
3788  * Objects that implement the ProcessingInstruction interface:
3789  *
3790  *     Objects that implement the ProcessingInstruction interface
3791  *     have all properties and functions of the Node interface
3792  *     as well as the properties and functions defined below.
3793  *     Properties of objects that implement the ProcessingInstruction 
3794  *     interface:
3795  * 
3796  *         target
3797  *             This read-only property is a String.
3798  *         data
3799  *             This property is a String and can raise an object
3800  *             that implements the DOMException interface on setting.
3801  * 
3802  */
3805 #undef CURRENT_CLASS
3806 #define CURRENT_CLASS  ProcessingInstruction
3808 class CLASS_NAME(CURRENT_CLASS) : public Wrapper
3810 public:
3812      CLASS_NAME(CURRENT_CLASS)(JSContext*cx, JSObject *obj)
3813                     : Wrapper(cx, obj)
3814         {}
3815         
3816     ~CLASS_NAME(CURRENT_CLASS)()
3817         {}
3819     JSBool init(uintN argc, jsval *argv)
3820         {
3821         return JS_TRUE;
3822         }
3823         
3824     JSBool getProperty(jsval id, jsval *vp)
3825         {
3826         return JS_FALSE;
3827         }
3829     JSBool setProperty(jsval id, jsval *vp)
3830         {
3831         return JS_FALSE;
3832         }
3834         /**
3835          *
3836          */
3837     METHOD(getDOMImplementation)
3838         {
3839         return JS_FALSE;
3840         }
3841         
3843         /**
3844          *
3845          */
3846     METHOD(getDOMImplementationList)
3847         {
3848         return JS_FALSE;
3849         }
3851     enum
3852         {
3853         prop_code
3854         };
3856 };
3861 JSPropertySpec PROPERTY_TABLE(CURRENT_CLASS)[] = 
3862
3863     { 0 }
3864 };
3866 JSFunctionSpec METHOD_TABLE(CURRENT_CLASS)[] = 
3868     { 0 }
3869 };
3871 JSPropertySpec STATIC_PROPERTY_TABLE(CURRENT_CLASS)[] = 
3872
3873     { 0 }
3874 };
3876 JSFunctionSpec STATIC_METHOD_TABLE(CURRENT_CLASS)[] = 
3878     { 0 }
3879 };
3882 CONSTRUCTOR ( CURRENT_CLASS )
3889 /**
3890  * Note: In addition of having DOMConfiguration parameters
3891  * exposed to the application using the setParameter
3892  * and getParameter, those parameters are also exposed
3893  * as ECMAScript properties on the DOMConfiguration object.
3894  * The name of the parameter is converted into a property name
3895  * using a camel-case convention: 
3896  *         the character '-' (HYPHEN-MINUS) is removed
3897  *         and the following character is 
3898  *         being replaced by its uppercase equivalent.
3899  */
3900  
3905 //########################################################################
3906 //# M A I N    B I N D I N G
3907 //########################################################################
3909 bool JavascriptDOMBinder::createClasses()
3911     void *savedContext = JS_GetContextPrivate(cx);
3912         JS_SetContextPrivate(cx, (void *)this);
3914     proto_Node =
3915              CREATE_PROTO(Node, cx, globalObj, NULL);
3916     proto_CharacterData =
3917              CREATE_PROTO(CharacterData, cx, globalObj, proto_Node);
3918     proto_Text =
3919              CREATE_PROTO(Text, cx, globalObj, proto_CharacterData);
3920     proto_CDATASection =
3921              CREATE_PROTO(CDATASection, cx, globalObj, proto_Text);
3922     proto_Document =
3923              CREATE_PROTO(Document, cx, globalObj, proto_CDATASection);
3925         JS_SetContextPrivate(cx, savedContext);
3926     return true;
3930 JSObject *JavascriptDOMBinder::wrapDocument(const Document *doc)
3932     if (!doc)
3933         {
3934         error("wrapDocument: null document parameter");
3935         return NULL;
3936         }
3938     JSObject *jsdoc = JS_NewObject(cx, &wrapperClassDef,
3939                     proto_Document, NULL);
3941     //Wrap around the document...  done!
3942     CLASS_NAME(Document) *docWrap = new CLASS_NAME(Document)(cx, globalObj);
3943     docWrap->doc = doc;
3944     JS_SetPrivate(cx, jsdoc, (void *)docWrap);
3945     
3946     return jsdoc;
3952 } // namespace dom
3953 } // namespace w3c
3954 } // namespace org
3956 //########################################################################
3957 //# E N D    O F    F I L E
3958 //########################################################################