document.write shoud stringify all args

This commit is contained in:
Daniel Silverstone 2015-08-11 19:39:31 +02:00
parent 78c5ab6f9f
commit ab79f0a9c5

View File

@ -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;