1<!DOCTYPE html> 2<title>TSKit (CanvasKit with Typescript)</title> 3<meta charset="utf-8" /> 4<meta http-equiv="X-UA-Compatible" content="IE=edge"> 5<meta name="viewport" content="width=device-width, initial-scale=1.0"> 6 7<script type="text/javascript" src="/npm_build/bin/tskit.js"></script> 8 9<script type="text/javascript" charset="utf-8"> 10 async function run() { 11 const tsKit = InitTSKit({locateFile: (file) => '/npm_build/bin/' + file}); 12 13 const TSK = await tsKit; 14 TSK.sayHello(8, 4); 15 TSK.publicFunction("vanilla"); 16 17 const sm = new TSK.Something("sentinel"); 18 sm.setName("double_vision"); 19 console.log(sm.getName()); 20 sm.delete(); 21 22 if (TSK.publicExtension) { 23 console.log("extension", TSK.publicExtension([0, 0, 10, 10, 10, 10, 20, 20])); 24 TSK.withObject({alpha: 7, beta: "foo"}); 25 } else { 26 console.log("no extension") 27 } 28 } 29 run(); 30 31</script>