summaryrefslogtreecommitdiff
path: root/src/duk-libdom.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/duk-libdom.c')
-rw-r--r--src/duk-libdom.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/duk-libdom.c b/src/duk-libdom.c
index 31ec0a1..b01ac4e 100644
--- a/src/duk-libdom.c
+++ b/src/duk-libdom.c
@@ -870,12 +870,23 @@ output_interface_prototype(FILE* outf,
struct interface_map_entry *interfacee,
struct interface_map_entry *inherite)
{
+ struct genbind_node *proto_node;
+
+ /* find the prototype method on the class */
+ proto_node = genbind_node_find_method(interfacee->class,
+ NULL,
+ GENBIND_METHOD_TYPE_PROTOTYPE);
+
/* prototype definition */
- fprintf(outf,
- "duk_ret_t %s_%s___proto(duk_context *ctx)\n",
+ fprintf(outf, "duk_ret_t %s_%s___proto(duk_context *ctx)\n",
DLPFX, interfacee->class_name);
fprintf(outf,"{\n");
+ /* Output any binding data first */
+ if (output_cdata(outf, proto_node, GENBIND_NODE_TYPE_CDATA) != 0) {
+ fprintf(outf,"\n");
+ }
+
/* generate prototype chaining if interface has a parent */
if (inherite != NULL) {
fprintf(outf,