Update jerryscript each frame.
This commit is contained in:
+10
-6
@@ -10,12 +10,16 @@ const platformNames = {
|
||||
|
||||
Console.print('Platform: ' + (platformNames[System.platform] || 'Unknown'));
|
||||
|
||||
const test = require('test.js');
|
||||
Console.print(test.str());
|
||||
test.increment();
|
||||
Console.print(test.str());
|
||||
test.decrement();
|
||||
Console.print(test.str());
|
||||
// Testing async/await
|
||||
async function testAsync() {
|
||||
Console.print('Testing async/await...');
|
||||
await new Promise(resolve => requestAnimationFrame(resolve));
|
||||
Console.print('First await done!');
|
||||
await new Promise(resolve => setTimeout(resolve, 1000));
|
||||
Console.print('Async/await works!');
|
||||
}
|
||||
|
||||
testAsync();
|
||||
|
||||
// Scene.set('testscene.js');
|
||||
// Console.print('Loading scene...');
|
||||
|
||||
Reference in New Issue
Block a user