Gitweb links:

...log 
http://git.netsurf-browser.org/netsurf.git/shortlog/ce7e6d91f50c3e204a2bb5521c616d1f94b63143
...commit 
http://git.netsurf-browser.org/netsurf.git/commit/ce7e6d91f50c3e204a2bb5521c616d1f94b63143
...tree 
http://git.netsurf-browser.org/netsurf.git/tree/ce7e6d91f50c3e204a2bb5521c616d1f94b63143

The branch, master has been updated
       via  ce7e6d91f50c3e204a2bb5521c616d1f94b63143 (commit)
      from  955cf5f97b9a2d906a6052e0ad681f344afb9600 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commitdiff 
http://git.netsurf-browser.org/netsurf.git/commit/?id=ce7e6d91f50c3e204a2bb5521c616d1f94b63143
commit ce7e6d91f50c3e204a2bb5521c616d1f94b63143
Author: Daniel Silverstone <[email protected]>
Commit: Daniel Silverstone <[email protected]>

    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 <[email protected]>

diff --git a/content/handlers/javascript/duktape/Window.bnd 
b/content/handlers/javascript/duktape/Window.bnd
index 1a76862..fc1ce24 100644
--- a/content/handlers/javascript/duktape/Window.bnd
+++ b/content/handlers/javascript/duktape/Window.bnd
@@ -271,26 +271,94 @@ prototype Window()
 #define EXPOSE(v) \
        duk_get_global_string(ctx, #v); \
        duk_put_prop_string(ctx, 0, #v)
-       /* steal undefined */
+       /* 
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects
 */
+       /* ** Value properties */
+       EXPOSE(infinity);
+       EXPOSE(NaN);
        EXPOSE(undefined);
+       EXPOSE(null);
+       EXPOSE(globalThis);
+
+       /* ** Function properties */
        EXPOSE(eval);
-       EXPOSE(Object);
-       EXPOSE(parseInt);
+       /* EXPOSE(uneval); */ /* Not standard, maybe not available */
+       EXPOSE(isFinite);
+       EXPOSE(isNaN);
        EXPOSE(parseFloat);
-       EXPOSE(Array);
+       EXPOSE(parseInt);
+       EXPOSE(decodeURI);
+       EXPOSE(decodeURIComponent);
+       EXPOSE(encodeURI);
+       EXPOSE(encodeURIComponent);
+       EXPOSE(escape);
+       EXPOSE(unescape);
+
+       /* ** Fundamental Objects */
+       EXPOSE(Object);
+       EXPOSE(Function);
+       EXPOSE(Boolean);
+       EXPOSE(Symbol);
+       EXPOSE(Error);
+       EXPOSE(EvalError);
+       EXPOSE(InternalError);
+       EXPOSE(RangeError);
+       EXPOSE(ReferenceError);
+       EXPOSE(SyntaxError);
+       EXPOSE(TypeError);
+       EXPOSE(URIError);
+
+       /* ** Numbers and Dates */
+       EXPOSE(Number);
+       EXPOSE(BigInt);
+       EXPOSE(Math);
        EXPOSE(Date);
+
+       /* ** Text Processing */
+       EXPOSE(String);
        EXPOSE(RegExp);
-       EXPOSE(Math);
-       EXPOSE(Function);
+
+       /* ** Indexed Collections */
+       EXPOSE(Array);
+       EXPOSE(Int8Array);
+       EXPOSE(Uint8Array);
+       EXPOSE(Uint8ClampedArray);
+       EXPOSE(Int16Array);
+       EXPOSE(Uint16Array);
+       EXPOSE(Int32Array);
+       EXPOSE(Uint32Array);
+       EXPOSE(Float32Array);
+       EXPOSE(Float64Array);
+       /* EXPOSE(BigInt64Array); */ /* Duktape seems to lack this */
+       /* EXPOSE(BigUint64Array); */ /* Duktape seems to lack this */
+
+       /* ** Keyed Collections */
+       /* EXPOSE(Map); */
+       /* EXPOSE(Set); */
+       /* EXPOSE(WeakMap); */
+       /* EXPOSE(WeakSet); */
+
+       /* Structured Data */
+       EXPOSE(ArrayBuffer);
+       /* EXPOSE(SharedArrayBuffer); */ /* Duktape lacks this - experimental 
API */
+       /* EXPOSE(Atomics); */ /* Duktape lacks this - experimental API */
+       EXPOSE(DataView);
+       EXPOSE(JSON);
+
+       /* ** Control abstraction properties */
+       /* EXPOSE(Promise); */ /* Probably ought to be one of ours? */
+       /* EXPOSE(Generator); */ /* Duktape and async? */
+       /* EXPOSE(GeneratorFunction); */ /* Duktape and async? */
+       /* EXPOSE(AsyncFunction); */ /* Duktape lacks this - experimental API */
+
+       /* Reflection */
+       EXPOSE(Reflect);
        EXPOSE(Proxy);
-       EXPOSE(String);
-       EXPOSE(Number);
-       EXPOSE(Error);
-       EXPOSE(encodeURI);
-       EXPOSE(encodeURIComponent);
-       EXPOSE(NaN);
-       EXPOSE(isNaN);
-       EXPOSE(isFinite);
+
+       /* ** Internationalisation */
+       /* Duktape lacks Intl - Maybe polyfill it? */
+
+       /* ** WebAssembly */
+       /* As yet, Duktape lacks WA */
 #undef EXPOSE
        /* Add s3kr1t method to close the compartment */
        duk_dup(ctx, 0);


-----------------------------------------------------------------------

Summary of changes:
 content/handlers/javascript/duktape/Window.bnd |   96 ++++++++++++++++++++----
 1 file changed, 82 insertions(+), 14 deletions(-)

diff --git a/content/handlers/javascript/duktape/Window.bnd 
b/content/handlers/javascript/duktape/Window.bnd
index 1a76862..fc1ce24 100644
--- a/content/handlers/javascript/duktape/Window.bnd
+++ b/content/handlers/javascript/duktape/Window.bnd
@@ -271,26 +271,94 @@ prototype Window()
 #define EXPOSE(v) \
        duk_get_global_string(ctx, #v); \
        duk_put_prop_string(ctx, 0, #v)
-       /* steal undefined */
+       /* 
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects
 */
+       /* ** Value properties */
+       EXPOSE(infinity);
+       EXPOSE(NaN);
        EXPOSE(undefined);
+       EXPOSE(null);
+       EXPOSE(globalThis);
+
+       /* ** Function properties */
        EXPOSE(eval);
-       EXPOSE(Object);
-       EXPOSE(parseInt);
+       /* EXPOSE(uneval); */ /* Not standard, maybe not available */
+       EXPOSE(isFinite);
+       EXPOSE(isNaN);
        EXPOSE(parseFloat);
-       EXPOSE(Array);
+       EXPOSE(parseInt);
+       EXPOSE(decodeURI);
+       EXPOSE(decodeURIComponent);
+       EXPOSE(encodeURI);
+       EXPOSE(encodeURIComponent);
+       EXPOSE(escape);
+       EXPOSE(unescape);
+
+       /* ** Fundamental Objects */
+       EXPOSE(Object);
+       EXPOSE(Function);
+       EXPOSE(Boolean);
+       EXPOSE(Symbol);
+       EXPOSE(Error);
+       EXPOSE(EvalError);
+       EXPOSE(InternalError);
+       EXPOSE(RangeError);
+       EXPOSE(ReferenceError);
+       EXPOSE(SyntaxError);
+       EXPOSE(TypeError);
+       EXPOSE(URIError);
+
+       /* ** Numbers and Dates */
+       EXPOSE(Number);
+       EXPOSE(BigInt);
+       EXPOSE(Math);
        EXPOSE(Date);
+
+       /* ** Text Processing */
+       EXPOSE(String);
        EXPOSE(RegExp);
-       EXPOSE(Math);
-       EXPOSE(Function);
+
+       /* ** Indexed Collections */
+       EXPOSE(Array);
+       EXPOSE(Int8Array);
+       EXPOSE(Uint8Array);
+       EXPOSE(Uint8ClampedArray);
+       EXPOSE(Int16Array);
+       EXPOSE(Uint16Array);
+       EXPOSE(Int32Array);
+       EXPOSE(Uint32Array);
+       EXPOSE(Float32Array);
+       EXPOSE(Float64Array);
+       /* EXPOSE(BigInt64Array); */ /* Duktape seems to lack this */
+       /* EXPOSE(BigUint64Array); */ /* Duktape seems to lack this */
+
+       /* ** Keyed Collections */
+       /* EXPOSE(Map); */
+       /* EXPOSE(Set); */
+       /* EXPOSE(WeakMap); */
+       /* EXPOSE(WeakSet); */
+
+       /* Structured Data */
+       EXPOSE(ArrayBuffer);
+       /* EXPOSE(SharedArrayBuffer); */ /* Duktape lacks this - experimental 
API */
+       /* EXPOSE(Atomics); */ /* Duktape lacks this - experimental API */
+       EXPOSE(DataView);
+       EXPOSE(JSON);
+
+       /* ** Control abstraction properties */
+       /* EXPOSE(Promise); */ /* Probably ought to be one of ours? */
+       /* EXPOSE(Generator); */ /* Duktape and async? */
+       /* EXPOSE(GeneratorFunction); */ /* Duktape and async? */
+       /* EXPOSE(AsyncFunction); */ /* Duktape lacks this - experimental API */
+
+       /* Reflection */
+       EXPOSE(Reflect);
        EXPOSE(Proxy);
-       EXPOSE(String);
-       EXPOSE(Number);
-       EXPOSE(Error);
-       EXPOSE(encodeURI);
-       EXPOSE(encodeURIComponent);
-       EXPOSE(NaN);
-       EXPOSE(isNaN);
-       EXPOSE(isFinite);
+
+       /* ** Internationalisation */
+       /* Duktape lacks Intl - Maybe polyfill it? */
+
+       /* ** WebAssembly */
+       /* As yet, Duktape lacks WA */
 #undef EXPOSE
        /* Add s3kr1t method to close the compartment */
        duk_dup(ctx, 0);


-- 
NetSurf Browser

_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org

Reply via email to