royale-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harbs <harbs.li...@gmail.com>
Subject Re: [royale-asjs] branch develop updated: Add ‘glue’ utility script to allow WASM to be loaded in HTML
Date Tue, 14 Nov 2017 21:35:01 GMT
I’m curious about the context of this script.

Will all environments where this is being run understand ES6 arrow functions?

> On Nov 14, 2017, at 5:54 PM, erikdebruin@apache.org wrote:
> 
> This is an automated email from the ASF dual-hosted git repository.
> 
> erikdebruin pushed a commit to branch develop
> in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
> 
> 
> The following commit(s) were added to refs/heads/develop by this push:
>     new 3dc37ce  Add ‘glue’ utility script to allow WASM to be loaded in HTML
> 3dc37ce is described below
> 
> commit 3dc37ceb90c20be37639068061dba14b79e9461b
> Author: Erik de Bruin <erik@ixsoftware.nl>
> AuthorDate: Tue Nov 14 16:54:13 2017 +0100
> 
>    Add ‘glue’ utility script to allow WASM to be loaded in HTML
> 
>    Signed-off-by: Erik de Bruin <erik@ixsoftware.nl>
> ---
> .gitignore             |  3 +++
> wast/resources/glue.js | 11 +++++++++++
> 2 files changed, 14 insertions(+)
> 
> diff --git a/.gitignore b/.gitignore
> index a32c5ce..64c80a8 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -141,3 +141,6 @@ vf2js/frameworks/js/
> #FlexJS generated files
> frameworks/js/FlexJS/generated-sources
> manualtests/FlexJSTest_SVG/bin
> +
> +#WAST generated files
> +/wast/examples/HelloWorld/bin
> diff --git a/wast/resources/glue.js b/wast/resources/glue.js
> new file mode 100644
> index 0000000..fe66877
> --- /dev/null
> +++ b/wast/resources/glue.js
> @@ -0,0 +1,11 @@
> +function fetchAndInstantiate(url, importObject) {
> +  return fetch(url).then(response =>
> +    response.arrayBuffer()
> +  )
> +  .then(bytes =>
> +    WebAssembly.instantiate(bytes, importObject)
> +  )
> +  .then(results =>
> +    results.instance
> +  );
> +}
> 
> -- 
> To stop receiving notification emails like this one, please contact
> ['"commits@royale.apache.org" <commits@royale.apache.org>'].


Mime
View raw message