Adding script load.
Still need to enhance to support script src.
This commit is contained in:
@ -791,6 +791,17 @@ JSWORD: release { handle }
|
||||
context.ReleaseHandle(handle);
|
||||
~
|
||||
|
||||
JSWORD: importScripts { dst dst_limit -- n }
|
||||
if (context.scripts === undefined) {
|
||||
return 0;
|
||||
}
|
||||
var data = context.scripts;
|
||||
for (var i = 0; i < dst_limit && i < data.length; ++i) {
|
||||
u8[dst + i] = data[i];
|
||||
}
|
||||
return data.length;
|
||||
~
|
||||
|
||||
r~
|
||||
context.audio_context = null;
|
||||
context.audio_channels = [];
|
||||
@ -916,6 +927,10 @@ JSWORD: random { n -- n }
|
||||
return Math.floor(Math.random() * n);
|
||||
~
|
||||
|
||||
0 0 importScripts constant scripts#
|
||||
create scripts scripts# allot
|
||||
scripts scripts# importScripts drop
|
||||
|
||||
forth definitions web
|
||||
|
||||
: ms-ticks ms-ticks ;
|
||||
|
||||
Reference in New Issue
Block a user