Daniel Silverstone
ba4c20a0c7
dukky: Fix assignment in assert
...
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-10-03 14:21:26 +01:00
Daniel Silverstone
2d58372ec2
Console: Do not try and log through a closed down window
...
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-10-02 20:15:23 +01:00
Vincent Sanders
d5d14df76b
initial implementation of split messages in c
...
functional but the compression switch still needs implementing
2020-06-15 00:21:06 +01:00
Vincent Sanders
154a6b6987
implement a minimal xxd for builds to remove external dependancy
2020-06-03 23:34:57 +01:00
Daniel Silverstone
39552607a5
canvas: Implement fully correct putImageData features
...
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-05-24 19:34:04 +01:00
Michael Drake
3bf39f7f2c
JS dom event binding: Squash leak of string.
2020-05-24 16:25:30 +01:00
Daniel Silverstone
74b8767ee2
Canvas: Do not overrun destination bitmap during creation
...
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-05-24 16:21:36 +01:00
Daniel Silverstone
d157b505e6
canvas: Support changing canvas size at runtime
...
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-05-23 23:44:39 +01:00
Daniel Silverstone
d8f083bf52
Canvas: Move bitmap management to the 2D render context
...
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-05-23 10:15:30 +01:00
Daniel Silverstone
aec946b4ff
CanvasRenderingContext2D: More verbose input validation error message
...
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-05-22 20:26:32 +01:00
Daniel Silverstone
daed553a06
javascript: Support Canvas to a basic level
...
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-05-22 19:53:23 +01:00
Vincent Sanders
b39db1dac4
add missing header includes from previous change
2020-05-08 09:08:31 +01:00
Vincent Sanders
ab952e0634
improve content header usage
2020-05-07 20:55:44 +01:00
Vincent Sanders
a706c69bf4
improve html content handler private headers
2020-05-02 20:47:53 +01:00
Daniel Silverstone
d3d17ded9c
dukky: Don't allow js_exec on a thread pending destruction
...
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-04-26 15:46:54 +01:00
Daniel Silverstone
2cb33b0c33
dukky: Various checks for win being NULL
...
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-04-26 15:35:36 +01:00
Daniel Silverstone
24ec30359b
Window: Do not get stuck if callbacks are in-train during compartment close
...
When we close the JS compartment we try and cancel all callbacks so that
they do not fire after the compartment is closed. However if we have
in-train callbacks, they can gum up the closedown and so we need to check
and if we've done all we can, we break out of the callback removal loop.
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-04-25 14:04:54 +01:00
Vincent Sanders
bf4cbc95b0
add bindings for canvas width and height
2020-04-24 22:05:57 +01:00
Daniel Silverstone
8f7bfb7b56
Window: Add flag to ensure we don't set timeouts after close
...
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-03-22 10:14:31 +00:00
Daniel Silverstone
d1e2eef18b
JS: Add concept of js_closethread
...
In order to better model content close vs destroy, add the concept
of closing a thread to the JS interface.
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-03-22 10:14:00 +00:00
Daniel Silverstone
98e461a3b3
Dukky: Make heaps refcounted too
...
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-03-22 09:59:52 +00:00
Daniel Silverstone
80e7ac7345
Dukky: Add refcounting to threads
...
In order to cope with threads which manage to navigate entirely
while executing (sadly possible) we need to handle the possibility
that a thread is destroyed by the browser but still needs to live
until it returns from whatever exec it was doing at the time.
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-03-21 20:49:40 +00:00
Daniel Silverstone
3c4652c1c3
Dukky: Upgrade dukky binding to support new heap/thread split
...
Update the duktape bindings and dukky interface to support the
new JS heap/thread split. Heaps may have multiple active threads
though in general there will only be 2 at a time.
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-03-21 20:01:38 +00:00
Daniel Silverstone
337082f715
JS: Add concept of thread destroy
...
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-03-21 18:57:57 +00:00
Daniel Silverstone
17b28e85c1
JS: Split concept of JS context into heap and thread
...
In preparation for proper splitting of Javascript support into
heaps and threads, this renames the types and corrects the no-js
builds to still work. At this time no substantive change in
semantics exists, and the duktape build won't work.
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-03-21 18:30:41 +00:00
Daniel Silverstone
313dc9b099
JS: Remove unused slow script callback
...
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-03-21 18:07:50 +00:00
Daniel Silverstone
b633bef7bf
Node: nodeValue setter should return value set into node
...
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-23 09:33:26 +00:00
Daniel Silverstone
bfd185ac49
dukky: Guard pointless work for deep debug
...
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-23 09:19:51 +00:00
Daniel Silverstone
bc1810ed61
JS: it's Infinity not infinity
...
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-21 19:37:54 +00:00
Daniel Silverstone
d0e775e901
JS: Add Element::attributes and NamedNodeMap to handle it
...
This is a *very* rudimentary implementation lacking most of the
functionality of NamedNodeMap but it's enough to get jQuery 1.12.4 up.
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-21 18:40:35 +00:00
Daniel Silverstone
b23063bb52
JS Generics: Add a NodeMap proxy builder
...
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-21 18:40:16 +00:00
Daniel Silverstone
2325062ff1
Element: support innerHTML
...
To get us further along the JavaScript pathway, support the
getter and setter for innerHTML. The getter always returns
an empty string for now, but the setter works.
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-21 18:02:57 +00:00
Daniel Silverstone
61fdb8fda6
JS: Add DOMImplementation::createHTMLDocument
...
This was the last major thing blocking basic jQuery support
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2020-02-21 16:19:00 +00:00
Michael Drake
f620ea9d17
dukky_push_event: Enable KeyboardEvent specialisation.
2019-12-01 21:25:46 +00:00
Michael Drake
23d413c561
JavaScript: Add KeyboardEvent bindings.
2019-12-01 21:25:46 +00:00
Daniel Silverstone
df496cc8bc
Window: set{Timeout,Interval}() default delay 10ms
...
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-08-21 21:46:52 +01:00
Michael Drake
90fe920e07
Duktape element binding: Check dom_string_create for error.
2019-08-04 11:11:35 +01:00
Daniel Silverstone
1150cf684d
dukky: Remove unused dukky_safe_get()
...
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-08-02 15:08:46 +01:00
Daniel Silverstone
09cce349da
dukky: Clean up our stacktrace reporting
...
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-08-02 14:55:34 +01:00
Daniel Silverstone
0eb5aa68fb
Duktape: Hopefully silence issue with %lld
...
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-08-02 14:19:13 +01:00
Michael Drake
15a3c21232
Duktape: Make declaration match definition for memcmp and double_div.
2019-08-02 14:19:13 +01:00
Michael Drake
ee338c9b24
Duktape: Make declaration match definition for duk_refzero_check_fast()
2019-08-02 14:19:13 +01:00
Michael Drake
1c2a0021b3
Duktape: Make declarations match definitions for fastint-enabled functions.
2019-08-02 14:19:13 +01:00
Michael Drake
80116bfe9f
Duktape: Make declarations match definitions for duk_raw_read_xxx_be
2019-08-02 14:19:13 +01:00
Michael Drake
22a348fa31
Duktape: Make declarations match definitions for inline functions.
2019-08-02 14:19:13 +01:00
Michael Drake
f320725307
Duktape: Prevent clang static analysis.
2019-08-02 14:19:13 +01:00
Michael Drake
b4bbca89cd
Duktape: Update to 2.4.0 release.
2019-08-02 14:19:13 +01:00
Daniel Silverstone
095a0639d3
Document.bnd: Fix cookies getter and implement setter
...
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-08-02 12:23:45 +01:00
Daniel Silverstone
9742a8317f
Dukky: Add and utilise a jserrors category
...
Normal, and verbose logging will now also log all JS errors in order that we
stand a chance of debugging things more easily when testing.
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-08-02 10:12:45 +01:00
Daniel Silverstone
609ee9b71c
Window: Provide a little more info on why not EXPOSE()ing some stuff
...
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-08-02 09:27:06 +01:00