mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
Merge with http://elinks.cz/elinks.git
This commit is contained in:
commit
49b70d838b
@ -212,14 +212,21 @@ js_document_write_do(struct SEE_interpreter *interp, struct SEE_object *self,
|
|||||||
struct string *ret = g->ret;
|
struct string *ret = g->ret;
|
||||||
|
|
||||||
if (argc >= 1 && ret) {
|
if (argc >= 1 && ret) {
|
||||||
unsigned char *code = SEE_value_to_unsigned_char(interp, argv[0]);
|
int i = 0;
|
||||||
|
|
||||||
if (code) {
|
for (; i < argc; ++i) {
|
||||||
add_to_string(ret, code);
|
unsigned char *code;
|
||||||
mem_free(code);
|
|
||||||
if (newline)
|
code = SEE_value_to_unsigned_char(interp, argv[i]);
|
||||||
add_char_to_string(ret, '\n');
|
|
||||||
|
if (code) {
|
||||||
|
add_to_string(ret, code);
|
||||||
|
mem_free(code);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (newline)
|
||||||
|
add_char_to_string(ret, '\n');
|
||||||
}
|
}
|
||||||
#ifdef CONFIG_LEDS
|
#ifdef CONFIG_LEDS
|
||||||
/* XXX: I don't know about you, but I have *ENOUGH* of those 'Undefined
|
/* XXX: I don't know about you, but I have *ENOUGH* of those 'Undefined
|
||||||
|
@ -212,9 +212,14 @@ document_write_do(JSContext *ctx, JSObject *obj, uintN argc, jsval *argv,
|
|||||||
struct string *ret = interpreter->ret;
|
struct string *ret = interpreter->ret;
|
||||||
|
|
||||||
if (argc >= 1 && ret) {
|
if (argc >= 1 && ret) {
|
||||||
unsigned char *code = jsval_to_string(ctx, &argv[0]);
|
int i = 0;
|
||||||
|
|
||||||
|
for (; i < argc; ++i) {
|
||||||
|
unsigned char *code = jsval_to_string(ctx, &argv[i]);
|
||||||
|
|
||||||
|
add_to_string(ret, code);
|
||||||
|
}
|
||||||
|
|
||||||
add_to_string(ret, code);
|
|
||||||
if (newline)
|
if (newline)
|
||||||
add_char_to_string(ret, '\n');
|
add_char_to_string(ret, '\n');
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,8 @@
|
|||||||
<a href="history.html">history.html</a><br/>
|
<a href="history.html">history.html</a><br/>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
document.writeln('<a href="ontest.html">Test</a><br/>');
|
document.writeln('<a href="ontest.html">Test</a><br/>');
|
||||||
document.write('<a href="infinite2.html">infinite2.html</a><br/>');
|
document.writeln('<a href="infinite2.html">infinite2.html</a><br/>');
|
||||||
|
document.write(1,2,'3', '<br/>');
|
||||||
</script>
|
</script>
|
||||||
<a href="onload.html">onload.html</a><br/>
|
<a href="onload.html">onload.html</a><br/>
|
||||||
</body>
|
</body>
|
||||||
|
Loading…
Reference in New Issue
Block a user