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
Daniel Silverstone
ce7e6d91f5
Window: Restructure EXPOSE()d globals
...
By reference to the MDN and to Duktape's CLI, expose everything
we possibly can on the global object (Window).
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-08-02 09:17:12 +01:00
Daniel Silverstone
e85e2f7cdf
dukky.c: Correct typo (BUTTOM -> BUTTON)
...
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-08-01 21:57:36 +01:00
Daniel Silverstone
f365e75407
Dukky: Support console logging better
...
Add a polyfill for Array.from(), and fix the console formatter so that
it won't keep exploding. This should improve matters in the tests.
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-08-01 21:40:54 +01:00
Daniel Silverstone
bb3e0e51f1
dukky: Attempt to make the fallback to HTMLUnknownElement more useful.
...
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-08-01 21:03:07 +01:00
Daniel Silverstone
a325d6b474
Console.bnd: Support attempts to log when Window has gone
...
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-08-01 09:22:09 +01:00
Vincent Sanders
730d59776a
cleanup some javascript documentation comments
2019-07-12 13:40:26 +01:00
Vincent Sanders
90530c419e
when owning context is destroyed ensure that active js compartment is destroyed first
2019-07-12 13:37:04 +01:00
Vincent Sanders
c2fa6af0ff
make content close check the content status itself
...
make content handler open and close return error status
2019-07-10 16:42:52 +01:00
Vincent Sanders
1ae0ee21ee
add isFinite to global context
2019-07-01 23:26:11 +01:00
Vincent Sanders
dc9762fef3
revert 8265b8b66f
as ssize_t is not available everywhere
2019-06-25 08:49:29 +01:00
Daniel Silverstone
8265b8b66f
Duktape: Probably should use ssize_t
...
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-06-15 21:34:47 +01:00
Daniel Silverstone
84b8e7dfa1
Duktape: Hopefully silence issue with %lld
...
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-06-15 21:33:59 +01:00
Daniel Silverstone
e82107a296
Window.bnd: Suppress some unnecessary stack frame dumps
...
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-06-09 15:59:05 +01:00
Daniel Silverstone
c5c8a49276
Window.bnd: Expose isNan
...
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-06-09 15:20:01 +01:00
Daniel Silverstone
04cf2fe588
Window.bnd: Do not remove in-train callbacks
...
Sometimes callbacks may be cancelled from within themselves. In
that case we need to simply ensure that should the callback be
wanted to repeat, we instead stop that so that once the callback
is completed we do not attempt to reschedule something which had
already been deleted.
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-06-09 11:04:15 +01:00
Vincent Sanders
dddc5eac94
Update schedulers return codes
...
The GTK and monkey frontends schedulers now return NSERROR_NOT_FOUND
when a caller is using a negative schedule time to remove a callback.
2019-06-08 13:33:16 +01:00
Daniel Silverstone
c07b2edd77
Document.bnd: createDocumentFragment() unref fragment
...
The pushed fragment node holds the reference, so unref it in
the end of createDocumentFragment()
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-06-01 13:59:36 +01:00
Vincent Sanders
a6de56583c
Improve javascript unimplemented bnding documentation generation
2019-05-31 19:40:10 +01:00
Daniel Silverstone
57094c84ed
Expose NaN on Window
...
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-05-25 20:11:52 +01:00
Daniel Silverstone
196c2fc845
Add dodgy window method to clear callbacks
...
Until we can determine *how* the compartment isn't cleaning
up properly in the duktape context, this will at least mean
we don't get unpleasant callback related issues when compartments
are reset during browsing.
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-05-25 16:23:37 +01:00
Daniel Silverstone
87be4e7a17
Log when we finalise window objects
...
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-05-25 16:13:57 +01:00
Daniel Silverstone
c42039c546
Use generics for makeListProxy properly
...
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-05-25 16:13:57 +01:00
Daniel Silverstone
9ee92823e2
Use generics for makeListProxy properly
...
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-05-25 16:13:57 +01:00
Daniel Silverstone
78385629c3
Remove unnecessary generics magic
...
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-05-25 16:13:57 +01:00