From 4f68b1af47f034e603e6e1e5cee395c35225bf87 Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Tue, 5 Jun 2007 22:18:11 +0200 Subject: [PATCH] DOM, ecmascript: Added functions for creation SpiderMonkey's objects. --- .../ecmascript/spidermonkey/html/HTMLAnchorElement.c | 12 ++++++++++++ .../ecmascript/spidermonkey/html/HTMLAnchorElement.h | 1 + .../ecmascript/spidermonkey/html/HTMLAppletElement.c | 12 ++++++++++++ .../ecmascript/spidermonkey/html/HTMLAppletElement.h | 1 + .../ecmascript/spidermonkey/html/HTMLAreaElement.c | 12 ++++++++++++ .../ecmascript/spidermonkey/html/HTMLAreaElement.h | 1 + .../dom/ecmascript/spidermonkey/html/HTMLBRElement.c | 11 +++++++++++ .../dom/ecmascript/spidermonkey/html/HTMLBRElement.h | 1 + .../ecmascript/spidermonkey/html/HTMLBaseElement.c | 12 ++++++++++++ .../ecmascript/spidermonkey/html/HTMLBaseElement.h | 1 + .../spidermonkey/html/HTMLBaseFontElement.c | 12 ++++++++++++ .../spidermonkey/html/HTMLBaseFontElement.h | 1 + .../ecmascript/spidermonkey/html/HTMLBodyElement.c | 12 ++++++++++++ .../ecmascript/spidermonkey/html/HTMLBodyElement.h | 1 + .../ecmascript/spidermonkey/html/HTMLButtonElement.c | 12 ++++++++++++ .../ecmascript/spidermonkey/html/HTMLButtonElement.h | 1 + .../ecmascript/spidermonkey/html/HTMLDListElement.c | 12 ++++++++++++ .../ecmascript/spidermonkey/html/HTMLDListElement.h | 1 + .../spidermonkey/html/HTMLDirectoryElement.c | 12 ++++++++++++ .../spidermonkey/html/HTMLDirectoryElement.h | 1 + .../ecmascript/spidermonkey/html/HTMLDivElement.c | 12 ++++++++++++ .../ecmascript/spidermonkey/html/HTMLDivElement.h | 1 + .../dom/ecmascript/spidermonkey/html/HTMLElement.h | 3 +++ .../ecmascript/spidermonkey/html/HTMLFontElement.c | 12 ++++++++++++ .../ecmascript/spidermonkey/html/HTMLFontElement.h | 1 + .../ecmascript/spidermonkey/html/HTMLFormElement.c | 11 +++++++++++ .../ecmascript/spidermonkey/html/HTMLFormElement.h | 1 + .../ecmascript/spidermonkey/html/HTMLFrameElement.c | 12 ++++++++++++ .../ecmascript/spidermonkey/html/HTMLFrameElement.h | 1 + .../spidermonkey/html/HTMLFrameSetElement.c | 12 ++++++++++++ .../spidermonkey/html/HTMLFrameSetElement.h | 1 + .../dom/ecmascript/spidermonkey/html/HTMLHRElement.c | 12 ++++++++++++ .../dom/ecmascript/spidermonkey/html/HTMLHRElement.h | 1 + .../ecmascript/spidermonkey/html/HTMLHeadElement.c | 12 ++++++++++++ .../ecmascript/spidermonkey/html/HTMLHeadElement.h | 1 + .../spidermonkey/html/HTMLHeadingElement.c | 12 ++++++++++++ .../spidermonkey/html/HTMLHeadingElement.h | 1 + .../ecmascript/spidermonkey/html/HTMLHtmlElement.c | 12 ++++++++++++ .../ecmascript/spidermonkey/html/HTMLHtmlElement.h | 1 + .../ecmascript/spidermonkey/html/HTMLIFrameElement.c | 12 ++++++++++++ .../ecmascript/spidermonkey/html/HTMLIFrameElement.h | 1 + .../ecmascript/spidermonkey/html/HTMLImageElement.c | 12 ++++++++++++ .../ecmascript/spidermonkey/html/HTMLImageElement.h | 1 + .../ecmascript/spidermonkey/html/HTMLInputElement.c | 12 ++++++++++++ .../ecmascript/spidermonkey/html/HTMLInputElement.h | 1 + .../spidermonkey/html/HTMLIsIndexElement.c | 12 ++++++++++++ .../spidermonkey/html/HTMLIsIndexElement.h | 1 + .../dom/ecmascript/spidermonkey/html/HTMLLIElement.c | 12 ++++++++++++ .../dom/ecmascript/spidermonkey/html/HTMLLIElement.h | 1 + .../ecmascript/spidermonkey/html/HTMLLabelElement.c | 12 ++++++++++++ .../ecmascript/spidermonkey/html/HTMLLabelElement.h | 1 + .../ecmascript/spidermonkey/html/HTMLLegendElement.c | 12 ++++++++++++ .../ecmascript/spidermonkey/html/HTMLLegendElement.h | 1 + .../ecmascript/spidermonkey/html/HTMLLinkElement.c | 12 ++++++++++++ .../ecmascript/spidermonkey/html/HTMLLinkElement.h | 1 + .../ecmascript/spidermonkey/html/HTMLMapElement.c | 12 ++++++++++++ .../ecmascript/spidermonkey/html/HTMLMapElement.h | 1 + .../ecmascript/spidermonkey/html/HTMLMenuElement.c | 12 ++++++++++++ .../ecmascript/spidermonkey/html/HTMLMenuElement.h | 1 + .../ecmascript/spidermonkey/html/HTMLMetaElement.c | 12 ++++++++++++ .../ecmascript/spidermonkey/html/HTMLMetaElement.h | 1 + .../ecmascript/spidermonkey/html/HTMLModElement.c | 12 ++++++++++++ .../ecmascript/spidermonkey/html/HTMLModElement.h | 1 + .../ecmascript/spidermonkey/html/HTMLOListElement.c | 12 ++++++++++++ .../ecmascript/spidermonkey/html/HTMLOListElement.h | 1 + .../ecmascript/spidermonkey/html/HTMLObjectElement.c | 12 ++++++++++++ .../ecmascript/spidermonkey/html/HTMLObjectElement.h | 1 + .../spidermonkey/html/HTMLOptGroupElement.c | 12 ++++++++++++ .../spidermonkey/html/HTMLOptGroupElement.h | 1 + .../ecmascript/spidermonkey/html/HTMLOptionElement.c | 12 ++++++++++++ .../ecmascript/spidermonkey/html/HTMLOptionElement.h | 1 + .../spidermonkey/html/HTMLParagraphElement.c | 12 ++++++++++++ .../spidermonkey/html/HTMLParagraphElement.h | 1 + .../ecmascript/spidermonkey/html/HTMLParamElement.c | 12 ++++++++++++ .../ecmascript/spidermonkey/html/HTMLParamElement.h | 1 + .../ecmascript/spidermonkey/html/HTMLPreElement.c | 12 ++++++++++++ .../ecmascript/spidermonkey/html/HTMLPreElement.h | 1 + .../ecmascript/spidermonkey/html/HTMLQuoteElement.c | 12 ++++++++++++ .../ecmascript/spidermonkey/html/HTMLQuoteElement.h | 1 + .../ecmascript/spidermonkey/html/HTMLScriptElement.c | 12 ++++++++++++ .../ecmascript/spidermonkey/html/HTMLScriptElement.h | 1 + .../ecmascript/spidermonkey/html/HTMLSelectElement.c | 12 ++++++++++++ .../ecmascript/spidermonkey/html/HTMLSelectElement.h | 1 + .../ecmascript/spidermonkey/html/HTMLStyleElement.c | 12 ++++++++++++ .../ecmascript/spidermonkey/html/HTMLStyleElement.h | 1 + .../spidermonkey/html/HTMLTableCaptionElement.c | 12 ++++++++++++ .../spidermonkey/html/HTMLTableCaptionElement.h | 1 + .../spidermonkey/html/HTMLTableCellElement.c | 12 ++++++++++++ .../spidermonkey/html/HTMLTableCellElement.h | 1 + .../spidermonkey/html/HTMLTableColElement.c | 12 ++++++++++++ .../spidermonkey/html/HTMLTableColElement.h | 1 + .../ecmascript/spidermonkey/html/HTMLTableElement.c | 12 ++++++++++++ .../ecmascript/spidermonkey/html/HTMLTableElement.h | 1 + .../spidermonkey/html/HTMLTableRowElement.c | 12 ++++++++++++ .../spidermonkey/html/HTMLTableRowElement.h | 1 + .../spidermonkey/html/HTMLTableSectionElement.c | 1 - .../spidermonkey/html/HTMLTextAreaElement.c | 11 +++++++++++ .../spidermonkey/html/HTMLTextAreaElement.h | 1 + .../ecmascript/spidermonkey/html/HTMLTitleElement.c | 11 +++++++++++ .../ecmascript/spidermonkey/html/HTMLTitleElement.h | 1 + .../ecmascript/spidermonkey/html/HTMLUListElement.c | 11 +++++++++++ .../ecmascript/spidermonkey/html/HTMLUListElement.h | 1 + 102 files changed, 648 insertions(+), 1 deletion(-) diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLAnchorElement.c b/src/document/dom/ecmascript/spidermonkey/html/HTMLAnchorElement.c index 3150eeb8d..3982dc88e 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLAnchorElement.c +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLAnchorElement.c @@ -178,3 +178,15 @@ const JSClass HTMLAnchorElement_class = { HTMLAnchorElement_getProperty, HTMLAnchorElement_setProperty, JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, Node_finalize }; + +void +make_A_object(JSContext *ctx, struct dom_node *node) +{ + struct html_objects *o = JS_GetContextPrivate(ctx); + + node->data.element.html_data = mem_calloc(1, sizeof(struct A_struct)); + if (node->data.element.html_data) { + node->ecmascript_obj = JS_NewObject(ctx, (JSClass *)&HTMLAnchorElement_class, o->HTMLElement_object, NULL); + } +} + diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLAnchorElement.h b/src/document/dom/ecmascript/spidermonkey/html/HTMLAnchorElement.h index 453fb38bb..5adb03a93 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLAnchorElement.h +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLAnchorElement.h @@ -24,4 +24,5 @@ struct A_struct { int tab_index; }; +void make_A_object(JSContext *ctx, struct dom_node *node); #endif diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLAppletElement.c b/src/document/dom/ecmascript/spidermonkey/html/HTMLAppletElement.c index 1c4ae8585..a6b20c853 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLAppletElement.c +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLAppletElement.c @@ -151,3 +151,15 @@ const JSClass HTMLAppletElement_class = { HTMLAppletElement_getProperty, HTMLAppletElement_setProperty, JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, Node_finalize }; + +void +make_APPLET_object(JSContext *ctx, struct dom_node *node) +{ + struct html_objects *o = JS_GetContextPrivate(ctx); + + node->data.element.html_data = mem_calloc(1, sizeof(struct APPLET_struct)); + if (node->data.element.html_data) { + node->ecmascript_obj = JS_NewObject(ctx, (JSClass *)&HTMLAppletElement_class, o->HTMLElement_object, NULL); + } +} + diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLAppletElement.h b/src/document/dom/ecmascript/spidermonkey/html/HTMLAppletElement.h index 7ffb30b35..269cf7546 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLAppletElement.h +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLAppletElement.h @@ -23,4 +23,5 @@ struct APPLET_struct { int vspace; }; +void make_APPLET_object(JSContext *ctx, struct dom_node *node); #endif diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLAreaElement.c b/src/document/dom/ecmascript/spidermonkey/html/HTMLAreaElement.c index 1ff52da70..6f3ad3408 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLAreaElement.c +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLAreaElement.c @@ -131,3 +131,15 @@ const JSClass HTMLAreaElement_class = { HTMLAreaElement_getProperty, HTMLAreaElement_setProperty, JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, Node_finalize }; + +void +make_AREA_object(JSContext *ctx, struct dom_node *node) +{ + struct html_objects *o = JS_GetContextPrivate(ctx); + + node->data.element.html_data = mem_calloc(1, sizeof(struct AREA_struct)); + if (node->data.element.html_data) { + node->ecmascript_obj = JS_NewObject(ctx, (JSClass *)&HTMLAreaElement_class, o->HTMLElement_object, NULL); + } +} + diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLAreaElement.h b/src/document/dom/ecmascript/spidermonkey/html/HTMLAreaElement.h index 855574868..6107e6a61 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLAreaElement.h +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLAreaElement.h @@ -20,4 +20,5 @@ struct AREA_struct { unsigned int no_href:1; }; +void make_AREA_object(JSContext *ctx, struct dom_node *node); #endif diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLBRElement.c b/src/document/dom/ecmascript/spidermonkey/html/HTMLBRElement.c index 80217d4d8..159e2ccb3 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLBRElement.c +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLBRElement.c @@ -84,3 +84,14 @@ const JSClass HTMLBRElement_class = { JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, Node_finalize }; +void +make_BR_object(JSContext *ctx, struct dom_node *node) +{ + struct html_objects *o = JS_GetContextPrivate(ctx); + + node->data.element.html_data = mem_calloc(1, sizeof(struct BR_struct)); + if (node->data.element.html_data) { + node->ecmascript_obj = JS_NewObject(ctx, (JSClass *)&HTMLBRElement_class, o->HTMLElement_object, NULL); + } +} + diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLBRElement.h b/src/document/dom/ecmascript/spidermonkey/html/HTMLBRElement.h index b6c735463..305a126d5 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLBRElement.h +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLBRElement.h @@ -13,4 +13,5 @@ struct BR_struct { unsigned char *clear; }; +void make_BR_object(JSContext *ctx, struct dom_node *node); #endif diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLBaseElement.c b/src/document/dom/ecmascript/spidermonkey/html/HTMLBaseElement.c index 744882070..726cd4950 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLBaseElement.c +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLBaseElement.c @@ -90,3 +90,15 @@ const JSClass HTMLBaseElement_class = { HTMLBaseElement_getProperty, HTMLBaseElement_setProperty, JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, Node_finalize }; + +void +make_BASE_object(JSContext *ctx, struct dom_node *node) +{ + struct html_objects *o = JS_GetContextPrivate(ctx); + + node->data.element.html_data = mem_calloc(1, sizeof(struct BASE_struct)); + if (node->data.element.html_data) { + node->ecmascript_obj = JS_NewObject(ctx, (JSClass *)&HTMLBaseElement_class, o->HTMLElement_object, NULL); + } +} + diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLBaseElement.h b/src/document/dom/ecmascript/spidermonkey/html/HTMLBaseElement.h index f11cd3ed7..d67336c43 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLBaseElement.h +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLBaseElement.h @@ -14,4 +14,5 @@ struct BASE_struct { unsigned char *target; }; +void make_BASE_object(JSContext *ctx, struct dom_node *node); #endif diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLBaseFontElement.c b/src/document/dom/ecmascript/spidermonkey/html/HTMLBaseFontElement.c index bf4b491d6..18ad67111 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLBaseFontElement.c +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLBaseFontElement.c @@ -96,3 +96,15 @@ const JSClass HTMLBaseFontElement_class = { HTMLBaseFontElement_getProperty, HTMLBaseFontElement_setProperty, JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, Node_finalize }; + +void +make_BASEFONT_object(JSContext *ctx, struct dom_node *node) +{ + struct html_objects *o = JS_GetContextPrivate(ctx); + + node->data.element.html_data = mem_calloc(1, sizeof(struct BASEFONT_struct)); + if (node->data.element.html_data) { + node->ecmascript_obj = JS_NewObject(ctx, (JSClass *)&HTMLBaseFontElement_class, o->HTMLElement_object, NULL); + } +} + diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLBaseFontElement.h b/src/document/dom/ecmascript/spidermonkey/html/HTMLBaseFontElement.h index 2c80af6c1..5f6eb96e4 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLBaseFontElement.h +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLBaseFontElement.h @@ -15,4 +15,5 @@ struct BASEFONT_struct { int size; }; +void make_BASEFONT_object(JSContext *ctx, struct dom_node *node); #endif diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLBodyElement.c b/src/document/dom/ecmascript/spidermonkey/html/HTMLBodyElement.c index f939bed78..0110a6c45 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLBodyElement.c +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLBodyElement.c @@ -118,3 +118,15 @@ const JSClass HTMLBodyElement_class = { HTMLBodyElement_getProperty, HTMLBodyElement_setProperty, JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, Node_finalize }; + +void +make_BODY_object(JSContext *ctx, struct dom_node *node) +{ + struct html_objects *o = JS_GetContextPrivate(ctx); + + node->data.element.html_data = mem_calloc(1, sizeof(struct BODY_struct)); + if (node->data.element.html_data) { + node->ecmascript_obj = JS_NewObject(ctx, (JSClass *)&HTMLBodyElement_class, o->HTMLElement_object, NULL); + } +} + diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLBodyElement.h b/src/document/dom/ecmascript/spidermonkey/html/HTMLBodyElement.h index 89e9e93da..073f96cbe 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLBodyElement.h +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLBodyElement.h @@ -18,4 +18,5 @@ struct BODY_struct { unsigned char *vlink; }; +void make_BODY_object(JSContext *ctx, struct dom_node *node); #endif diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLButtonElement.c b/src/document/dom/ecmascript/spidermonkey/html/HTMLButtonElement.c index 46961683a..3a178b988 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLButtonElement.c +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLButtonElement.c @@ -119,3 +119,15 @@ const JSClass HTMLButtonElement_class = { HTMLButtonElement_getProperty, HTMLButtonElement_setProperty, JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, Node_finalize }; + +void +make_BUTTON_object(JSContext *ctx, struct dom_node *node) +{ + struct html_objects *o = JS_GetContextPrivate(ctx); + + node->data.element.html_data = mem_calloc(1, sizeof(struct BUTTON_struct)); + if (node->data.element.html_data) { + node->ecmascript_obj = JS_NewObject(ctx, (JSClass *)&HTMLButtonElement_class, o->HTMLElement_object, NULL); + } +} + diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLButtonElement.h b/src/document/dom/ecmascript/spidermonkey/html/HTMLButtonElement.h index db4557d6c..1e810d865 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLButtonElement.h +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLButtonElement.h @@ -19,4 +19,5 @@ struct BUTTON_struct { unsigned char disabled:1; }; +void make_BUTTON_object(JSContext *ctx, struct dom_node *node); #endif diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLDListElement.c b/src/document/dom/ecmascript/spidermonkey/html/HTMLDListElement.c index db973ebd9..b036c119b 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLDListElement.c +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLDListElement.c @@ -83,3 +83,15 @@ const JSClass HTMLDListElement_class = { HTMLDListElement_getProperty, HTMLDListElement_setProperty, JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, Node_finalize }; + +void +make_DL_object(JSContext *ctx, struct dom_node *node) +{ + struct html_objects *o = JS_GetContextPrivate(ctx); + + node->data.element.html_data = mem_calloc(1, sizeof(struct DL_struct)); + if (node->data.element.html_data) { + node->ecmascript_obj = JS_NewObject(ctx, (JSClass *)&HTMLDListElement_class, o->HTMLElement_object, NULL); + } +} + diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLDListElement.h b/src/document/dom/ecmascript/spidermonkey/html/HTMLDListElement.h index d1cedf3e4..2468e2b40 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLDListElement.h +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLDListElement.h @@ -13,4 +13,5 @@ struct DL_struct { unsigned int compact:1; }; +void make_DL_object(JSContext *ctx, struct dom_node *node); #endif diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLDirectoryElement.c b/src/document/dom/ecmascript/spidermonkey/html/HTMLDirectoryElement.c index 25e22e085..7e200269e 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLDirectoryElement.c +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLDirectoryElement.c @@ -83,3 +83,15 @@ const JSClass HTMLDirectoryElement_class = { HTMLDirectoryElement_getProperty, HTMLDirectoryElement_setProperty, JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, Node_finalize }; + +void +make_DIR_object(JSContext *ctx, struct dom_node *node) +{ + struct html_objects *o = JS_GetContextPrivate(ctx); + + node->data.element.html_data = mem_calloc(1, sizeof(struct DIR_struct)); + if (node->data.element.html_data) { + node->ecmascript_obj = JS_NewObject(ctx, (JSClass *)&HTMLDirectoryElement_class, o->HTMLElement_object, NULL); + } +} + diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLDirectoryElement.h b/src/document/dom/ecmascript/spidermonkey/html/HTMLDirectoryElement.h index cfd83dd3e..4a4c0da17 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLDirectoryElement.h +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLDirectoryElement.h @@ -13,4 +13,5 @@ struct DIR_struct { unsigned int compact:1; }; +void make_DIR_object(JSContext *ctx, struct dom_node *node); #endif diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLDivElement.c b/src/document/dom/ecmascript/spidermonkey/html/HTMLDivElement.c index 4ac3a91dc..c68ebedf8 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLDivElement.c +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLDivElement.c @@ -83,3 +83,15 @@ const JSClass HTMLDivElement_class = { HTMLDivElement_getProperty, HTMLDivElement_setProperty, JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, Node_finalize }; + +void +make_DIV_object(JSContext *ctx, struct dom_node *node) +{ + struct html_objects *o = JS_GetContextPrivate(ctx); + + node->data.element.html_data = mem_calloc(1, sizeof(struct DIV_struct)); + if (node->data.element.html_data) { + node->ecmascript_obj = JS_NewObject(ctx, (JSClass *)&HTMLDivElement_class, o->HTMLElement_object, NULL); + } +} + diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLDivElement.h b/src/document/dom/ecmascript/spidermonkey/html/HTMLDivElement.h index 164f404f3..e48d3f185 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLDivElement.h +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLDivElement.h @@ -13,4 +13,5 @@ struct DIV_struct { unsigned char *align; }; +void make_DIV_object(JSContext *ctx, struct dom_node *node); #endif diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLElement.h b/src/document/dom/ecmascript/spidermonkey/html/HTMLElement.h index 8f40f7c80..95bb56dd9 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLElement.h +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLElement.h @@ -18,4 +18,7 @@ struct HTMLElement_struct { unsigned char *class_name; }; +struct html_objects { /* FIXME: Better name for this type. */ + JSObject *HTMLElement_object; +}; #endif diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLFontElement.c b/src/document/dom/ecmascript/spidermonkey/html/HTMLFontElement.c index 8ee6becfd..e1b947796 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLFontElement.c +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLFontElement.c @@ -97,3 +97,15 @@ const JSClass HTMLFontElement_class = { HTMLFontElement_getProperty, HTMLFontElement_setProperty, JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, Node_finalize }; + +void +make_FONT_object(JSContext *ctx, struct dom_node *node) +{ + struct html_objects *o = JS_GetContextPrivate(ctx); + + node->data.element.html_data = mem_calloc(1, sizeof(struct FONT_struct)); + if (node->data.element.html_data) { + node->ecmascript_obj = JS_NewObject(ctx, (JSClass *)&HTMLFontElement_class, o->HTMLElement_object, NULL); + } +} + diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLFontElement.h b/src/document/dom/ecmascript/spidermonkey/html/HTMLFontElement.h index 70c7b8020..5769aecf5 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLFontElement.h +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLFontElement.h @@ -15,4 +15,5 @@ struct FONT_struct { unsigned char *size; }; +void make_FONT_object(JSContext *ctx, struct dom_node *node); #endif diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLFormElement.c b/src/document/dom/ecmascript/spidermonkey/html/HTMLFormElement.c index 66d3942dc..510493bd0 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLFormElement.c +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLFormElement.c @@ -150,3 +150,14 @@ const JSClass HTMLFormElement_class = { JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, Node_finalize }; +void +make_FORM_object(JSContext *ctx, struct dom_node *node) +{ + struct html_objects *o = JS_GetContextPrivate(ctx); + + node->data.element.html_data = mem_calloc(1, sizeof(struct FORM_struct)); + if (node->data.element.html_data) { + node->ecmascript_obj = JS_NewObject(ctx, (JSClass *)&HTMLFormElement_class, o->HTMLElement_object, NULL); + } +} + diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLFormElement.h b/src/document/dom/ecmascript/spidermonkey/html/HTMLFormElement.h index 4f7d3f699..7a89df764 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLFormElement.h +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLFormElement.h @@ -20,4 +20,5 @@ struct FORM_struct { int length; }; +void make_FORM_object(JSContext *ctx, struct dom_node *node); #endif diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLFrameElement.c b/src/document/dom/ecmascript/spidermonkey/html/HTMLFrameElement.c index 3c0639fcd..06f996d98 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLFrameElement.c +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLFrameElement.c @@ -137,3 +137,15 @@ const JSClass HTMLFrameElement_class = { HTMLFrameElement_getProperty, HTMLFrameElement_setProperty, JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, Node_finalize }; + +void +make_FRAME_object(JSContext *ctx, struct dom_node *node) +{ + struct html_objects *o = JS_GetContextPrivate(ctx); + + node->data.element.html_data = mem_calloc(1, sizeof(struct FRAME_struct)); + if (node->data.element.html_data) { + node->ecmascript_obj = JS_NewObject(ctx, (JSClass *)&HTMLFrameElement_class, o->HTMLElement_object, NULL); + } +} + diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLFrameElement.h b/src/document/dom/ecmascript/spidermonkey/html/HTMLFrameElement.h index fc3abf336..a90d400ff 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLFrameElement.h +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLFrameElement.h @@ -21,4 +21,5 @@ struct FRAME_struct { unsigned int no_resize:1; }; +void make_FRAME_object(JSContext *ctx, struct dom_node *node); #endif diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLFrameSetElement.c b/src/document/dom/ecmascript/spidermonkey/html/HTMLFrameSetElement.c index a11fb8fc1..476638eae 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLFrameSetElement.c +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLFrameSetElement.c @@ -90,3 +90,15 @@ const JSClass HTMLFrameSetElement_class = { HTMLFrameSetElement_getProperty, HTMLFrameSetElement_setProperty, JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, Node_finalize }; + +void +make_FRAMESET_object(JSContext *ctx, struct dom_node *node) +{ + struct html_objects *o = JS_GetContextPrivate(ctx); + + node->data.element.html_data = mem_calloc(1, sizeof(struct FRAMESET_struct)); + if (node->data.element.html_data) { + node->ecmascript_obj = JS_NewObject(ctx, (JSClass *)&HTMLFrameSetElement_class, o->HTMLElement_object, NULL); + } +} + diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLFrameSetElement.h b/src/document/dom/ecmascript/spidermonkey/html/HTMLFrameSetElement.h index 22ea04695..7e6a26775 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLFrameSetElement.h +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLFrameSetElement.h @@ -14,4 +14,5 @@ struct FRAMESET_struct { unsigned char *rows; }; +void make_FRAMESET_object(JSContext *ctx, struct dom_node *node); #endif diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLHRElement.c b/src/document/dom/ecmascript/spidermonkey/html/HTMLHRElement.c index bd51cc877..2723bd4e1 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLHRElement.c +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLHRElement.c @@ -104,3 +104,15 @@ const JSClass HTMLHRElement_class = { HTMLHRElement_getProperty, HTMLHRElement_setProperty, JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, Node_finalize }; + +void +make_HR_object(JSContext *ctx, struct dom_node *node) +{ + struct html_objects *o = JS_GetContextPrivate(ctx); + + node->data.element.html_data = mem_calloc(1, sizeof(struct HR_struct)); + if (node->data.element.html_data) { + node->ecmascript_obj = JS_NewObject(ctx, (JSClass *)&HTMLHRElement_class, o->HTMLElement_object, NULL); + } +} + diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLHRElement.h b/src/document/dom/ecmascript/spidermonkey/html/HTMLHRElement.h index c185797b6..e626dc319 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLHRElement.h +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLHRElement.h @@ -16,4 +16,5 @@ struct HR_struct { unsigned int no_shade:1; }; +void make_HR_object(JSContext *ctx, struct dom_node *node); #endif diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLHeadElement.c b/src/document/dom/ecmascript/spidermonkey/html/HTMLHeadElement.c index 3a50c96ae..69efa17e1 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLHeadElement.c +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLHeadElement.c @@ -83,3 +83,15 @@ const JSClass HTMLHeadElement_class = { HTMLHeadElement_getProperty, HTMLHeadElement_setProperty, JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, Node_finalize }; + +void +make_HEAD_object(JSContext *ctx, struct dom_node *node) +{ + struct html_objects *o = JS_GetContextPrivate(ctx); + + node->data.element.html_data = mem_calloc(1, sizeof(struct HEAD_struct)); + if (node->data.element.html_data) { + node->ecmascript_obj = JS_NewObject(ctx, (JSClass *)&HTMLHeadElement_class, o->HTMLElement_object, NULL); + } +} + diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLHeadElement.h b/src/document/dom/ecmascript/spidermonkey/html/HTMLHeadElement.h index c798fd1f5..80e2d1bb5 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLHeadElement.h +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLHeadElement.h @@ -13,4 +13,5 @@ struct HEAD_struct { unsigned char *profile; }; +void make_HEAD_object(JSContext *ctx, struct dom_node *node); #endif diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLHeadingElement.c b/src/document/dom/ecmascript/spidermonkey/html/HTMLHeadingElement.c index aaa5a318a..97ef26ca0 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLHeadingElement.c +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLHeadingElement.c @@ -83,3 +83,15 @@ const JSClass HTMLHeadingElement_class = { HTMLHeadingElement_getProperty, HTMLHeadingElement_setProperty, JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, Node_finalize }; + +void +make_H1_object(JSContext *ctx, struct dom_node *node) +{ + struct html_objects *o = JS_GetContextPrivate(ctx); + + node->data.element.html_data = mem_calloc(1, sizeof(struct H1_struct)); + if (node->data.element.html_data) { + node->ecmascript_obj = JS_NewObject(ctx, (JSClass *)&HTMLHeadingElement_class, o->HTMLElement_object, NULL); + } +} + diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLHeadingElement.h b/src/document/dom/ecmascript/spidermonkey/html/HTMLHeadingElement.h index 88f4f50a4..458588a6d 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLHeadingElement.h +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLHeadingElement.h @@ -13,4 +13,5 @@ struct H1_struct { unsigned char *align; }; +void make_H1_object(JSContext *ctx, struct dom_node *node); #endif diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLHtmlElement.c b/src/document/dom/ecmascript/spidermonkey/html/HTMLHtmlElement.c index a37bea2d8..3d4c50e50 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLHtmlElement.c +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLHtmlElement.c @@ -83,3 +83,15 @@ const JSClass HTMLHtmlElement_class = { HTMLHtmlElement_getProperty, HTMLHtmlElement_setProperty, JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, Node_finalize }; + +void +make_HTML_object(JSContext *ctx, struct dom_node *node) +{ + struct html_objects *o = JS_GetContextPrivate(ctx); + + node->data.element.html_data = mem_calloc(1, sizeof(struct HTML_struct)); + if (node->data.element.html_data) { + node->ecmascript_obj = JS_NewObject(ctx, (JSClass *)&HTMLHtmlElement_class, o->HTMLElement_object, NULL); + } +} + diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLHtmlElement.h b/src/document/dom/ecmascript/spidermonkey/html/HTMLHtmlElement.h index a6afc5944..8d6c93dde 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLHtmlElement.h +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLHtmlElement.h @@ -13,4 +13,5 @@ struct HTML_struct { unsigned char *version; }; +void make_HTML_object(JSContext *ctx, struct dom_node *node); #endif diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLIFrameElement.c b/src/document/dom/ecmascript/spidermonkey/html/HTMLIFrameElement.c index d82b58557..b8d710328 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLIFrameElement.c +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLIFrameElement.c @@ -151,3 +151,15 @@ const JSClass HTMLIFrameElement_class = { HTMLIFrameElement_getProperty, HTMLIFrameElement_setProperty, JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, Node_finalize }; + +void +make_IFRAME_object(JSContext *ctx, struct dom_node *node) +{ + struct html_objects *o = JS_GetContextPrivate(ctx); + + node->data.element.html_data = mem_calloc(1, sizeof(struct IFRAME_struct)); + if (node->data.element.html_data) { + node->ecmascript_obj = JS_NewObject(ctx, (JSClass *)&HTMLIFrameElement_class, o->HTMLElement_object, NULL); + } +} + diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLIFrameElement.h b/src/document/dom/ecmascript/spidermonkey/html/HTMLIFrameElement.h index e645d1788..896d6d09f 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLIFrameElement.h +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLIFrameElement.h @@ -23,4 +23,5 @@ struct IFRAME_struct { unsigned char *content_document; /* FIXME: proper type */ }; +void make_IFRAME_object(JSContext *ctx, struct dom_node *node); #endif diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLImageElement.c b/src/document/dom/ecmascript/spidermonkey/html/HTMLImageElement.c index 000cfd2a6..8d392810e 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLImageElement.c +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLImageElement.c @@ -156,3 +156,15 @@ const JSClass HTMLImageElement_class = { HTMLImageElement_getProperty, HTMLImageElement_setProperty, JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, Node_finalize }; + +void +make_IMAGE_object(JSContext *ctx, struct dom_node *node) +{ + struct html_objects *o = JS_GetContextPrivate(ctx); + + node->data.element.html_data = mem_calloc(1, sizeof(struct IMAGE_struct)); + if (node->data.element.html_data) { + node->ecmascript_obj = JS_NewObject(ctx, (JSClass *)&HTMLImageElement_class, o->HTMLElement_object, NULL); + } +} + diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLImageElement.h b/src/document/dom/ecmascript/spidermonkey/html/HTMLImageElement.h index 0d11b73bf..a8f1aab19 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLImageElement.h +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLImageElement.h @@ -24,4 +24,5 @@ struct IMAGE_struct { unsigned int is_map:1; }; +void make_IMAGE_object(JSContext *ctx, struct dom_node *node); #endif diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLInputElement.c b/src/document/dom/ecmascript/spidermonkey/html/HTMLInputElement.c index db8b38db0..e554b3a62 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLInputElement.c +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLInputElement.c @@ -233,3 +233,15 @@ const JSClass HTMLInputElement_class = { HTMLInputElement_getProperty, HTMLInputElement_setProperty, JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, Node_finalize }; + +void +make_INPUT_object(JSContext *ctx, struct dom_node *node) +{ + struct html_objects *o = JS_GetContextPrivate(ctx); + + node->data.element.html_data = mem_calloc(1, sizeof(struct INPUT_struct)); + if (node->data.element.html_data) { + node->ecmascript_obj = JS_NewObject(ctx, (JSClass *)&HTMLInputElement_class, o->HTMLElement_object, NULL); + } +} + diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLInputElement.h b/src/document/dom/ecmascript/spidermonkey/html/HTMLInputElement.h index 3177d9067..89b056110 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLInputElement.h +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLInputElement.h @@ -30,4 +30,5 @@ struct INPUT_struct { unsigned int read_only:1; }; +void make_INPUT_object(JSContext *ctx, struct dom_node *node); #endif diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLIsIndexElement.c b/src/document/dom/ecmascript/spidermonkey/html/HTMLIsIndexElement.c index c8582951c..9a3ced5f6 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLIsIndexElement.c +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLIsIndexElement.c @@ -88,3 +88,15 @@ const JSClass HTMLIsIndexElement_class = { HTMLIsIndexElement_getProperty, HTMLIsIndexElement_setProperty, JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, Node_finalize }; + +void +make_ISINDEX_object(JSContext *ctx, struct dom_node *node) +{ + struct html_objects *o = JS_GetContextPrivate(ctx); + + node->data.element.html_data = mem_calloc(1, sizeof(struct ISINDEX_struct)); + if (node->data.element.html_data) { + node->ecmascript_obj = JS_NewObject(ctx, (JSClass *)&HTMLIsIndexElement_class, o->HTMLElement_object, NULL); + } +} + diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLIsIndexElement.h b/src/document/dom/ecmascript/spidermonkey/html/HTMLIsIndexElement.h index 68fd25050..b7381809e 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLIsIndexElement.h +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLIsIndexElement.h @@ -14,4 +14,5 @@ struct ISINDEX_struct { unsigned char *prompt; }; +void make_ISINDEX_object(JSContext *ctx, struct dom_node *node); #endif diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLLIElement.c b/src/document/dom/ecmascript/spidermonkey/html/HTMLLIElement.c index 63c213136..610c0986b 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLLIElement.c +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLLIElement.c @@ -89,3 +89,15 @@ const JSClass HTMLLIElement_class = { HTMLLIElement_getProperty, HTMLLIElement_setProperty, JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, Node_finalize }; + +void +make_LI_object(JSContext *ctx, struct dom_node *node) +{ + struct html_objects *o = JS_GetContextPrivate(ctx); + + node->data.element.html_data = mem_calloc(1, sizeof(struct LI_struct)); + if (node->data.element.html_data) { + node->ecmascript_obj = JS_NewObject(ctx, (JSClass *)&HTMLLIElement_class, o->HTMLElement_object, NULL); + } +} + diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLLIElement.h b/src/document/dom/ecmascript/spidermonkey/html/HTMLLIElement.h index 6c6ba4dd3..8f8d36814 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLLIElement.h +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLLIElement.h @@ -14,4 +14,5 @@ struct LI_struct { int value; }; +void make_LI_object(JSContext *ctx, struct dom_node *node); #endif diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLLabelElement.c b/src/document/dom/ecmascript/spidermonkey/html/HTMLLabelElement.c index 74863e963..eae81b4b3 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLLabelElement.c +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLLabelElement.c @@ -95,3 +95,15 @@ const JSClass HTMLLabelElement_class = { HTMLLabelElement_getProperty, HTMLLabelElement_setProperty, JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, Node_finalize }; + +void +make_LABEL_object(JSContext *ctx, struct dom_node *node) +{ + struct html_objects *o = JS_GetContextPrivate(ctx); + + node->data.element.html_data = mem_calloc(1, sizeof(struct LABEL_struct)); + if (node->data.element.html_data) { + node->ecmascript_obj = JS_NewObject(ctx, (JSClass *)&HTMLLabelElement_class, o->HTMLElement_object, NULL); + } +} + diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLLabelElement.h b/src/document/dom/ecmascript/spidermonkey/html/HTMLLabelElement.h index 8d8b17ce7..e1ff799c8 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLLabelElement.h +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLLabelElement.h @@ -15,4 +15,5 @@ struct LABEL_struct { unsigned char *html_for; }; +void make_LABEL_object(JSContext *ctx, struct dom_node *node); #endif diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLLegendElement.c b/src/document/dom/ecmascript/spidermonkey/html/HTMLLegendElement.c index 2ee16119f..8600ab53b 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLLegendElement.c +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLLegendElement.c @@ -95,3 +95,15 @@ const JSClass HTMLLegendElement_class = { HTMLLegendElement_getProperty, HTMLLegendElement_setProperty, JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, Node_finalize }; + +void +make_LEGEND_object(JSContext *ctx, struct dom_node *node) +{ + struct html_objects *o = JS_GetContextPrivate(ctx); + + node->data.element.html_data = mem_calloc(1, sizeof(struct LEGEND_struct)); + if (node->data.element.html_data) { + node->ecmascript_obj = JS_NewObject(ctx, (JSClass *)&HTMLLegendElement_class, o->HTMLElement_object, NULL); + } +} + diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLLegendElement.h b/src/document/dom/ecmascript/spidermonkey/html/HTMLLegendElement.h index 0f3f37a24..1d79cc1a0 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLLegendElement.h +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLLegendElement.h @@ -15,4 +15,5 @@ struct LEGEND_struct { unsigned char *align; }; +void make_LEGEND_object(JSContext *ctx, struct dom_node *node); #endif diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLLinkElement.c b/src/document/dom/ecmascript/spidermonkey/html/HTMLLinkElement.c index 928f8af3e..811defa49 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLLinkElement.c +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLLinkElement.c @@ -139,3 +139,15 @@ const JSClass HTMLLinkElement_class = { HTMLLinkElement_getProperty, HTMLLinkElement_setProperty, JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, Node_finalize }; + +void +make_LINK_object(JSContext *ctx, struct dom_node *node) +{ + struct html_objects *o = JS_GetContextPrivate(ctx); + + node->data.element.html_data = mem_calloc(1, sizeof(struct LINK_struct)); + if (node->data.element.html_data) { + node->ecmascript_obj = JS_NewObject(ctx, (JSClass *)&HTMLLinkElement_class, o->HTMLElement_object, NULL); + } +} + diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLLinkElement.h b/src/document/dom/ecmascript/spidermonkey/html/HTMLLinkElement.h index 594a091b9..f03f85cda 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLLinkElement.h +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLLinkElement.h @@ -21,4 +21,5 @@ struct LINK_struct { unsigned int disabled:1; }; +void make_LINK_object(JSContext *ctx, struct dom_node *node); #endif diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLMapElement.c b/src/document/dom/ecmascript/spidermonkey/html/HTMLMapElement.c index 3549488a9..8214e35a4 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLMapElement.c +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLMapElement.c @@ -88,3 +88,15 @@ const JSClass HTMLMapElement_class = { HTMLMapElement_getProperty, HTMLMapElement_setProperty, JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, Node_finalize }; + +void +make_MAP_object(JSContext *ctx, struct dom_node *node) +{ + struct html_objects *o = JS_GetContextPrivate(ctx); + + node->data.element.html_data = mem_calloc(1, sizeof(struct MAP_struct)); + if (node->data.element.html_data) { + node->ecmascript_obj = JS_NewObject(ctx, (JSClass *)&HTMLMapElement_class, o->HTMLElement_object, NULL); + } +} + diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLMapElement.h b/src/document/dom/ecmascript/spidermonkey/html/HTMLMapElement.h index f070fccd8..7a6304286 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLMapElement.h +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLMapElement.h @@ -14,4 +14,5 @@ struct MAP_struct { unsigned char *name; }; +void make_MAP_object(JSContext *ctx, struct dom_node *node); #endif diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLMenuElement.c b/src/document/dom/ecmascript/spidermonkey/html/HTMLMenuElement.c index d536a1d9d..b2317a973 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLMenuElement.c +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLMenuElement.c @@ -83,3 +83,15 @@ const JSClass HTMLMenuElement_class = { HTMLMenuElement_getProperty, HTMLMenuElement_setProperty, JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, Node_finalize }; + +void +make_MENU_object(JSContext *ctx, struct dom_node *node) +{ + struct html_objects *o = JS_GetContextPrivate(ctx); + + node->data.element.html_data = mem_calloc(1, sizeof(struct MENU_struct)); + if (node->data.element.html_data) { + node->ecmascript_obj = JS_NewObject(ctx, (JSClass *)&HTMLMenuElement_class, o->HTMLElement_object, NULL); + } +} + diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLMenuElement.h b/src/document/dom/ecmascript/spidermonkey/html/HTMLMenuElement.h index 84bdda27e..60e8fc430 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLMenuElement.h +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLMenuElement.h @@ -13,4 +13,5 @@ struct MENU_struct { unsigned int compact:1; }; +void make_MENU_object(JSContext *ctx, struct dom_node *node); #endif diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLMetaElement.c b/src/document/dom/ecmascript/spidermonkey/html/HTMLMetaElement.c index 4e5840b88..1819a3b71 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLMetaElement.c +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLMetaElement.c @@ -104,3 +104,15 @@ const JSClass HTMLMetaElement_class = { HTMLMetaElement_getProperty, HTMLMetaElement_setProperty, JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, Node_finalize }; + +void +make_META_object(JSContext *ctx, struct dom_node *node) +{ + struct html_objects *o = JS_GetContextPrivate(ctx); + + node->data.element.html_data = mem_calloc(1, sizeof(struct META_struct)); + if (node->data.element.html_data) { + node->ecmascript_obj = JS_NewObject(ctx, (JSClass *)&HTMLMetaElement_class, o->HTMLElement_object, NULL); + } +} + diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLMetaElement.h b/src/document/dom/ecmascript/spidermonkey/html/HTMLMetaElement.h index c90412b11..3fa9070bf 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLMetaElement.h +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLMetaElement.h @@ -16,4 +16,5 @@ struct META_struct { unsigned char *scheme; }; +void make_META_object(JSContext *ctx, struct dom_node *node); #endif diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLModElement.c b/src/document/dom/ecmascript/spidermonkey/html/HTMLModElement.c index c57cba6ff..fcffc4f30 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLModElement.c +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLModElement.c @@ -90,3 +90,15 @@ const JSClass HTMLModElement_class = { HTMLModElement_getProperty, HTMLModElement_setProperty, JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, Node_finalize }; + +void +make_MOD_object(JSContext *ctx, struct dom_node *node) +{ + struct html_objects *o = JS_GetContextPrivate(ctx); + + node->data.element.html_data = mem_calloc(1, sizeof(struct MOD_struct)); + if (node->data.element.html_data) { + node->ecmascript_obj = JS_NewObject(ctx, (JSClass *)&HTMLModElement_class, o->HTMLElement_object, NULL); + } +} + diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLModElement.h b/src/document/dom/ecmascript/spidermonkey/html/HTMLModElement.h index 2be806f3e..b06561182 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLModElement.h +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLModElement.h @@ -14,4 +14,5 @@ struct MOD_struct { unsigned char *date_time; }; +void make_MOD_object(JSContext *ctx, struct dom_node *node); #endif diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLOListElement.c b/src/document/dom/ecmascript/spidermonkey/html/HTMLOListElement.c index 368338ef3..f2bf69e39 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLOListElement.c +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLOListElement.c @@ -96,3 +96,15 @@ const JSClass HTMLOListElement_class = { HTMLOListElement_getProperty, HTMLOListElement_setProperty, JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, Node_finalize }; + +void +make_OL_object(JSContext *ctx, struct dom_node *node) +{ + struct html_objects *o = JS_GetContextPrivate(ctx); + + node->data.element.html_data = mem_calloc(1, sizeof(struct OL_struct)); + if (node->data.element.html_data) { + node->ecmascript_obj = JS_NewObject(ctx, (JSClass *)&HTMLOListElement_class, o->HTMLElement_object, NULL); + } +} + diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLOListElement.h b/src/document/dom/ecmascript/spidermonkey/html/HTMLOListElement.h index 57ef78e8a..159d750fb 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLOListElement.h +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLOListElement.h @@ -15,4 +15,5 @@ struct OL_struct { unsigned int compact:1; }; +void make_OL_object(JSContext *ctx, struct dom_node *node); #endif diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLObjectElement.c b/src/document/dom/ecmascript/spidermonkey/html/HTMLObjectElement.c index 0731019ae..02419b6ac 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLObjectElement.c +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLObjectElement.c @@ -201,3 +201,15 @@ const JSClass HTMLObjectElement_class = { HTMLObjectElement_getProperty, HTMLObjectElement_setProperty, JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, Node_finalize }; + +void +make_OBJECT_object(JSContext *ctx, struct dom_node *node) +{ + struct html_objects *o = JS_GetContextPrivate(ctx); + + node->data.element.html_data = mem_calloc(1, sizeof(struct OBJECT_struct)); + if (node->data.element.html_data) { + node->ecmascript_obj = JS_NewObject(ctx, (JSClass *)&HTMLObjectElement_class, o->HTMLElement_object, NULL); + } +} + diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLObjectElement.h b/src/document/dom/ecmascript/spidermonkey/html/HTMLObjectElement.h index 6cbb0925a..ba6a45fc5 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLObjectElement.h +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLObjectElement.h @@ -31,4 +31,5 @@ struct OBJECT_struct { unsigned int declare:1; }; +void make_OBJECT_object(JSContext *ctx, struct dom_node *node); #endif diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLOptGroupElement.c b/src/document/dom/ecmascript/spidermonkey/html/HTMLOptGroupElement.c index 916ff3928..451864860 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLOptGroupElement.c +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLOptGroupElement.c @@ -90,3 +90,15 @@ const JSClass HTMLOptGroupElement_class = { HTMLOptGroupElement_getProperty, HTMLOptGroupElement_setProperty, JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, Node_finalize }; + +void +make_OPTGROUP_object(JSContext *ctx, struct dom_node *node) +{ + struct html_objects *o = JS_GetContextPrivate(ctx); + + node->data.element.html_data = mem_calloc(1, sizeof(struct OPTGROUP_struct)); + if (node->data.element.html_data) { + node->ecmascript_obj = JS_NewObject(ctx, (JSClass *)&HTMLOptGroupElement_class, o->HTMLElement_object, NULL); + } +} + diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLOptGroupElement.h b/src/document/dom/ecmascript/spidermonkey/html/HTMLOptGroupElement.h index ce6523f21..78eb1391d 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLOptGroupElement.h +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLOptGroupElement.h @@ -14,4 +14,5 @@ struct OPTGROUP_struct { unsigned int disabled:1; }; +void make_OPTGROUP_object(JSContext *ctx, struct dom_node *node); #endif diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLOptionElement.c b/src/document/dom/ecmascript/spidermonkey/html/HTMLOptionElement.c index 237e24009..e68807db1 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLOptionElement.c +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLOptionElement.c @@ -124,3 +124,15 @@ const JSClass HTMLOptionElement_class = { HTMLOptionElement_getProperty, HTMLOptionElement_setProperty, JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, Node_finalize }; + +void +make_OPTION_object(JSContext *ctx, struct dom_node *node) +{ + struct html_objects *o = JS_GetContextPrivate(ctx); + + node->data.element.html_data = mem_calloc(1, sizeof(struct OPTION_struct)); + if (node->data.element.html_data) { + node->ecmascript_obj = JS_NewObject(ctx, (JSClass *)&HTMLOptionElement_class, o->HTMLElement_object, NULL); + } +} + diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLOptionElement.h b/src/document/dom/ecmascript/spidermonkey/html/HTMLOptionElement.h index 992b8b5fd..536c74bdb 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLOptionElement.h +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLOptionElement.h @@ -20,4 +20,5 @@ struct OPTION_struct { unsigned int selected:1; }; +void make_OPTION_object(JSContext *ctx, struct dom_node *node); #endif diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLParagraphElement.c b/src/document/dom/ecmascript/spidermonkey/html/HTMLParagraphElement.c index 7f18f8ac4..d3ca45ed1 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLParagraphElement.c +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLParagraphElement.c @@ -83,3 +83,15 @@ const JSClass HTMLParagraphElement_class = { HTMLParagraphElement_getProperty, HTMLParagraphElement_setProperty, JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, Node_finalize }; + +void +make_P_object(JSContext *ctx, struct dom_node *node) +{ + struct html_objects *o = JS_GetContextPrivate(ctx); + + node->data.element.html_data = mem_calloc(1, sizeof(struct P_struct)); + if (node->data.element.html_data) { + node->ecmascript_obj = JS_NewObject(ctx, (JSClass *)&HTMLParagraphElement_class, o->HTMLElement_object, NULL); + } +} + diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLParagraphElement.h b/src/document/dom/ecmascript/spidermonkey/html/HTMLParagraphElement.h index 1410f9418..6cc07db99 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLParagraphElement.h +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLParagraphElement.h @@ -13,4 +13,5 @@ struct P_struct { unsigned char *align; }; +void make_P_object(JSContext *ctx, struct dom_node *node); #endif diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLParamElement.c b/src/document/dom/ecmascript/spidermonkey/html/HTMLParamElement.c index 694af2279..1203c51de 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLParamElement.c +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLParamElement.c @@ -104,3 +104,15 @@ const JSClass HTMLParamElement_class = { HTMLParamElement_getProperty, HTMLParamElement_setProperty, JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, Node_finalize }; + +void +make_PARAM_object(JSContext *ctx, struct dom_node *node) +{ + struct html_objects *o = JS_GetContextPrivate(ctx); + + node->data.element.html_data = mem_calloc(1, sizeof(struct PARAM_struct)); + if (node->data.element.html_data) { + node->ecmascript_obj = JS_NewObject(ctx, (JSClass *)&HTMLParamElement_class, o->HTMLElement_object, NULL); + } +} + diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLParamElement.h b/src/document/dom/ecmascript/spidermonkey/html/HTMLParamElement.h index 634b7e157..843d4a51d 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLParamElement.h +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLParamElement.h @@ -16,4 +16,5 @@ struct PARAM_struct { unsigned char *value_type; }; +void make_PARAM_object(JSContext *ctx, struct dom_node *node); #endif diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLPreElement.c b/src/document/dom/ecmascript/spidermonkey/html/HTMLPreElement.c index 8c8b2144d..61cd0c043 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLPreElement.c +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLPreElement.c @@ -82,3 +82,15 @@ const JSClass HTMLPreElement_class = { HTMLPreElement_getProperty, HTMLPreElement_setProperty, JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, Node_finalize }; + +void +make_PRE_object(JSContext *ctx, struct dom_node *node) +{ + struct html_objects *o = JS_GetContextPrivate(ctx); + + node->data.element.html_data = mem_calloc(1, sizeof(struct PRE_struct)); + if (node->data.element.html_data) { + node->ecmascript_obj = JS_NewObject(ctx, (JSClass *)&HTMLPreElement_class, o->HTMLElement_object, NULL); + } +} + diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLPreElement.h b/src/document/dom/ecmascript/spidermonkey/html/HTMLPreElement.h index bb74bf5f7..60ba1fdd4 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLPreElement.h +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLPreElement.h @@ -13,4 +13,5 @@ struct PRE_struct { int width; }; +void make_PRE_object(JSContext *ctx, struct dom_node *node); #endif diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLQuoteElement.c b/src/document/dom/ecmascript/spidermonkey/html/HTMLQuoteElement.c index d37a6f5fa..603417c7c 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLQuoteElement.c +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLQuoteElement.c @@ -83,3 +83,15 @@ const JSClass HTMLQuoteElement_class = { HTMLQuoteElement_getProperty, HTMLQuoteElement_setProperty, JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, Node_finalize }; + +void +make_QUOTE_object(JSContext *ctx, struct dom_node *node) +{ + struct html_objects *o = JS_GetContextPrivate(ctx); + + node->data.element.html_data = mem_calloc(1, sizeof(struct QUOTE_struct)); + if (node->data.element.html_data) { + node->ecmascript_obj = JS_NewObject(ctx, (JSClass *)&HTMLQuoteElement_class, o->HTMLElement_object, NULL); + } +} + diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLQuoteElement.h b/src/document/dom/ecmascript/spidermonkey/html/HTMLQuoteElement.h index caef75d1e..f1d830910 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLQuoteElement.h +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLQuoteElement.h @@ -13,4 +13,5 @@ struct QUOTE_struct { unsigned char *cite; }; +void make_QUOTE_object(JSContext *ctx, struct dom_node *node); #endif diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLScriptElement.c b/src/document/dom/ecmascript/spidermonkey/html/HTMLScriptElement.c index 6b6275e41..ffcf40075 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLScriptElement.c +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLScriptElement.c @@ -125,3 +125,15 @@ const JSClass HTMLScriptElement_class = { HTMLScriptElement_getProperty, HTMLScriptElement_setProperty, JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, Node_finalize }; + +void +make_SCRIPT_object(JSContext *ctx, struct dom_node *node) +{ + struct html_objects *o = JS_GetContextPrivate(ctx); + + node->data.element.html_data = mem_calloc(1, sizeof(struct SCRIPT_struct)); + if (node->data.element.html_data) { + node->ecmascript_obj = JS_NewObject(ctx, (JSClass *)&HTMLScriptElement_class, o->HTMLElement_object, NULL); + } +} + diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLScriptElement.h b/src/document/dom/ecmascript/spidermonkey/html/HTMLScriptElement.h index 17914814e..28eacc6ae 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLScriptElement.h +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLScriptElement.h @@ -19,4 +19,5 @@ struct SCRIPT_struct { unsigned int defer:1; }; +void make_SCRIPT_object(JSContext *ctx, struct dom_node *node); #endif diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLSelectElement.c b/src/document/dom/ecmascript/spidermonkey/html/HTMLSelectElement.c index 27f6e39cf..078dc4269 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLSelectElement.c +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLSelectElement.c @@ -178,3 +178,15 @@ const JSClass HTMLSelectElement_class = { HTMLSelectElement_getProperty, HTMLSelectElement_setProperty, JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, Node_finalize }; + +void +make_SELECT_object(JSContext *ctx, struct dom_node *node) +{ + struct html_objects *o = JS_GetContextPrivate(ctx); + + node->data.element.html_data = mem_calloc(1, sizeof(struct SELECT_struct)); + if (node->data.element.html_data) { + node->ecmascript_obj = JS_NewObject(ctx, (JSClass *)&HTMLSelectElement_class, o->HTMLElement_object, NULL); + } +} + diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLSelectElement.h b/src/document/dom/ecmascript/spidermonkey/html/HTMLSelectElement.h index 1cebc27d4..bc0008482 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLSelectElement.h +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLSelectElement.h @@ -23,4 +23,5 @@ struct SELECT_struct { unsigned int multiple:1; }; +void make_SELECT_object(JSContext *ctx, struct dom_node *node); #endif diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLStyleElement.c b/src/document/dom/ecmascript/spidermonkey/html/HTMLStyleElement.c index 37386a5ff..cc56cd72f 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLStyleElement.c +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLStyleElement.c @@ -97,3 +97,15 @@ const JSClass HTMLStyleElement_class = { HTMLStyleElement_getProperty, HTMLStyleElement_setProperty, JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, Node_finalize }; + +void +make_STYLE_object(JSContext *ctx, struct dom_node *node) +{ + struct html_objects *o = JS_GetContextPrivate(ctx); + + node->data.element.html_data = mem_calloc(1, sizeof(struct STYLE_struct)); + if (node->data.element.html_data) { + node->ecmascript_obj = JS_NewObject(ctx, (JSClass *)&HTMLStyleElement_class, o->HTMLElement_object, NULL); + } +} + diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLStyleElement.h b/src/document/dom/ecmascript/spidermonkey/html/HTMLStyleElement.h index b9c047f14..57a876df7 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLStyleElement.h +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLStyleElement.h @@ -15,4 +15,5 @@ struct STYLE_struct { unsigned int disabled:1; }; +void make_STYLE_object(JSContext *ctx, struct dom_node *node); #endif diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLTableCaptionElement.c b/src/document/dom/ecmascript/spidermonkey/html/HTMLTableCaptionElement.c index 0b3538ed1..903217331 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLTableCaptionElement.c +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLTableCaptionElement.c @@ -83,3 +83,15 @@ const JSClass HTMLTableCaptionElement_class = { HTMLTableCaptionElement_getProperty, HTMLTableCaptionElement_setProperty, JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, Node_finalize }; + +void +make_CAPTION_object(JSContext *ctx, struct dom_node *node) +{ + struct html_objects *o = JS_GetContextPrivate(ctx); + + node->data.element.html_data = mem_calloc(1, sizeof(struct CAPTION_struct)); + if (node->data.element.html_data) { + node->ecmascript_obj = JS_NewObject(ctx, (JSClass *)&HTMLTableCaptionElement_class, o->HTMLElement_object, NULL); + } +} + diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLTableCaptionElement.h b/src/document/dom/ecmascript/spidermonkey/html/HTMLTableCaptionElement.h index b76a8c85d..c03557916 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLTableCaptionElement.h +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLTableCaptionElement.h @@ -13,4 +13,5 @@ struct CAPTION_struct { unsigned char *align; }; +void make_CAPTION_object(JSContext *ctx, struct dom_node *node); #endif diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLTableCellElement.c b/src/document/dom/ecmascript/spidermonkey/html/HTMLTableCellElement.c index 2c94b27e9..5c77e5fc4 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLTableCellElement.c +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLTableCellElement.c @@ -176,3 +176,15 @@ const JSClass HTMLTableCellElement_class = { HTMLTableCellElement_getProperty, HTMLTableCellElement_setProperty, JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, Node_finalize }; + +void +make_TD_object(JSContext *ctx, struct dom_node *node) +{ + struct html_objects *o = JS_GetContextPrivate(ctx); + + node->data.element.html_data = mem_calloc(1, sizeof(struct TD_struct)); + if (node->data.element.html_data) { + node->ecmascript_obj = JS_NewObject(ctx, (JSClass *)&HTMLTableCellElement_class, o->HTMLElement_object, NULL); + } +} + diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLTableCellElement.h b/src/document/dom/ecmascript/spidermonkey/html/HTMLTableCellElement.h index b0cba0468..040d956b6 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLTableCellElement.h +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLTableCellElement.h @@ -27,4 +27,5 @@ struct TD_struct { unsigned int no_wrap:1; }; +void make_TD_object(JSContext *ctx, struct dom_node *node); #endif diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLTableColElement.c b/src/document/dom/ecmascript/spidermonkey/html/HTMLTableColElement.c index fab5b69d3..f5537270b 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLTableColElement.c +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLTableColElement.c @@ -117,3 +117,15 @@ const JSClass HTMLTableColElement_class = { HTMLTableColElement_getProperty, HTMLTableColElement_setProperty, JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, Node_finalize }; + +void +make_COL_object(JSContext *ctx, struct dom_node *node) +{ + struct html_objects *o = JS_GetContextPrivate(ctx); + + node->data.element.html_data = mem_calloc(1, sizeof(struct COL_struct)); + if (node->data.element.html_data) { + node->ecmascript_obj = JS_NewObject(ctx, (JSClass *)&HTMLTableColElement_class, o->HTMLElement_object, NULL); + } +} + diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLTableColElement.h b/src/document/dom/ecmascript/spidermonkey/html/HTMLTableColElement.h index 376241349..ae0893d00 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLTableColElement.h +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLTableColElement.h @@ -18,4 +18,5 @@ struct COL_struct { int span; }; +void make_COL_object(JSContext *ctx, struct dom_node *node); #endif diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLTableElement.c b/src/document/dom/ecmascript/spidermonkey/html/HTMLTableElement.c index 8584ace65..bafa5fceb 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLTableElement.c +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLTableElement.c @@ -248,3 +248,15 @@ const JSClass HTMLTableElement_class = { HTMLTableElement_getProperty, HTMLTableElement_setProperty, JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, Node_finalize }; + +void +make_TABLE_object(JSContext *ctx, struct dom_node *node) +{ + struct html_objects *o = JS_GetContextPrivate(ctx); + + node->data.element.html_data = mem_calloc(1, sizeof(struct TABLE_struct)); + if (node->data.element.html_data) { + node->ecmascript_obj = JS_NewObject(ctx, (JSClass *)&HTMLTableElement_class, o->HTMLElement_object, NULL); + } +} + diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLTableElement.h b/src/document/dom/ecmascript/spidermonkey/html/HTMLTableElement.h index 84664b384..049da0013 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLTableElement.h +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLTableElement.h @@ -26,4 +26,5 @@ struct TABLE_struct { unsigned char *width; }; +void make_TABLE_object(JSContext *ctx, struct dom_node *node); #endif diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLTableRowElement.c b/src/document/dom/ecmascript/spidermonkey/html/HTMLTableRowElement.c index 40e607e5c..a60342615 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLTableRowElement.c +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLTableRowElement.c @@ -142,3 +142,15 @@ const JSClass HTMLTableRowElement_class = { HTMLTableRowElement_getProperty, HTMLTableRowElement_setProperty, JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, Node_finalize }; + +void +make_TR_object(JSContext *ctx, struct dom_node *node) +{ + struct html_objects *o = JS_GetContextPrivate(ctx); + + node->data.element.html_data = mem_calloc(1, sizeof(struct TR_struct)); + if (node->data.element.html_data) { + node->ecmascript_obj = JS_NewObject(ctx, (JSClass *)&HTMLTableRowElement_class, o->HTMLElement_object, NULL); + } +} + diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLTableRowElement.h b/src/document/dom/ecmascript/spidermonkey/html/HTMLTableRowElement.h index 8a8e42855..82f020eaa 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLTableRowElement.h +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLTableRowElement.h @@ -20,4 +20,5 @@ struct TR_struct { int section_row_index; }; +void make_TR_object(JSContext *ctx, struct dom_node *node); #endif diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLTableSectionElement.c b/src/document/dom/ecmascript/spidermonkey/html/HTMLTableSectionElement.c index 4d103254f..33fac74df 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLTableSectionElement.c +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLTableSectionElement.c @@ -100,4 +100,3 @@ const JSClass HTMLTableSectionElement_class = { HTMLTableSectionElement_getProperty, HTMLTableSectionElement_setProperty, JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, Node_finalize }; - diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLTextAreaElement.c b/src/document/dom/ecmascript/spidermonkey/html/HTMLTextAreaElement.c index 22a0bcb25..d732b6744 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLTextAreaElement.c +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLTextAreaElement.c @@ -172,3 +172,14 @@ const JSClass HTMLTextAreaElement_class = { HTMLTextAreaElement_getProperty, HTMLTextAreaElement_setProperty, JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, Node_finalize }; + +void +make_TEXTAREA_object(JSContext *ctx, struct dom_node *node) +{ + struct html_objects *o = JS_GetContextPrivate(ctx); + + node->data.element.html_data = mem_calloc(1, sizeof(struct TEXTAREA_struct)); + if (node->data.element.html_data) { + node->ecmascript_obj = JS_NewObject(ctx, (JSClass *)&HTMLTextAreaElement_class, o->HTMLElement_object, NULL); + } +} diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLTextAreaElement.h b/src/document/dom/ecmascript/spidermonkey/html/HTMLTextAreaElement.h index d64075b40..7e7ab8edc 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLTextAreaElement.h +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLTextAreaElement.h @@ -23,4 +23,5 @@ struct TEXTAREA_struct { unsigned int read_only:1; }; +void make_TEXTAREA_object(JSContext *ctx, struct dom_node *node); #endif diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLTitleElement.c b/src/document/dom/ecmascript/spidermonkey/html/HTMLTitleElement.c index 365910809..85560c2dd 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLTitleElement.c +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLTitleElement.c @@ -79,3 +79,14 @@ const JSClass HTMLTitleElement_class = { HTMLTitleElement_getProperty, HTMLTitleElement_setProperty, JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, Node_finalize }; + +void +make_TITLE_object(JSContext *ctx, struct dom_node *node) +{ + struct html_objects *o = JS_GetContextPrivate(ctx); + + node->data.element.html_data = mem_calloc(1, sizeof(struct TITLE_struct)); + if (node->data.element.html_data) { + node->ecmascript_obj = JS_NewObject(ctx, (JSClass *)&HTMLTitleElement_class, o->HTMLElement_object, NULL); + } +} diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLTitleElement.h b/src/document/dom/ecmascript/spidermonkey/html/HTMLTitleElement.h index a65bdc8ba..64746a4da 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLTitleElement.h +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLTitleElement.h @@ -13,4 +13,5 @@ struct TITLE_struct { unsigned char *text; }; +void make_TITLE_object(JSContext *ctx, struct dom_node *node); #endif diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLUListElement.c b/src/document/dom/ecmascript/spidermonkey/html/HTMLUListElement.c index 6b99057c8..aedf81420 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLUListElement.c +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLUListElement.c @@ -86,3 +86,14 @@ const JSClass HTMLUListElement_class = { HTMLUListElement_getProperty, HTMLUListElement_setProperty, JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, Node_finalize }; + +void +make_UL_object(JSContext *ctx, struct dom_node *node) +{ + struct html_objects *o = JS_GetContextPrivate(ctx); + + node->data.element.html_data = mem_calloc(1, sizeof(struct UL_struct)); + if (node->data.element.html_data) { + node->ecmascript_obj = JS_NewObject(ctx, (JSClass *)&HTMLUListElement_class, o->HTMLElement_object, NULL); + } +} diff --git a/src/document/dom/ecmascript/spidermonkey/html/HTMLUListElement.h b/src/document/dom/ecmascript/spidermonkey/html/HTMLUListElement.h index d68580183..1c3aae25a 100644 --- a/src/document/dom/ecmascript/spidermonkey/html/HTMLUListElement.h +++ b/src/document/dom/ecmascript/spidermonkey/html/HTMLUListElement.h @@ -14,4 +14,5 @@ struct UL_struct { unsigned int compact:1; }; +void make_UL_object(JSContext *ctx, struct dom_node *node); #endif