30 lines
431 B
HTML
30 lines
431 B
HTML
<!doctype html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Simple log example</title>
|
|
</head>
|
|
|
|
<body>
|
|
<script>
|
|
|
|
var importObject = {
|
|
console: {
|
|
log: function(arg) {
|
|
console.log(arg);
|
|
}
|
|
}
|
|
};
|
|
|
|
WebAssembly.instantiateStreaming(fetch('log.wasm'), importObject)
|
|
.then(obj => {
|
|
obj.instance.exports.logIt();
|
|
});
|
|
|
|
</script>
|
|
</body>
|
|
|
|
</html>
|