From ab79f0a9c55a0cc2250fe4bbe7ee0cb7d761044b Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Tue, 11 Aug 2015 19:39:31 +0200 Subject: [PATCH] document.write shoud stringify all args --- javascript/duktape/Document.bnd | 3 +++ 1 file changed, 3 insertions(+) diff --git a/javascript/duktape/Document.bnd b/javascript/duktape/Document.bnd index b99e43810..5541f1a24 100644 --- a/javascript/duktape/Document.bnd +++ b/javascript/duktape/Document.bnd @@ -22,6 +22,9 @@ method Document::write() %{ struct html_content *htmlc; duk_size_t text_len; + for (int i = 0; i < duk_get_top(ctx); ++i) + duk_safe_to_string(ctx, i); + duk_concat(ctx, duk_get_top(ctx)); const char *text = duk_safe_to_lstring(ctx, 0, &text_len); LOG("Writing %*s", (int)text_len, text); dom_exception err;